Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

a C prog to swap 2 no.s without using variables just an
array?

Answer Posted / laxmi bose

#include<stdio.h>
main()
{
int a[0],a[1],a[2];
scanf("%d%d",&a[0],&a[1]);
a[2]=a[0];
a[0]=a[1];
a[1]=a[2];
printf("%d,%d",a[0],a[1]);
}

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can 'this' pointer by used in the constructor?

1101


What is void main ()?

1082


Is struct oop?

1018


What is gets() function?

1143


What is the difference between mpi and openmp?

1308


Is c easy to learn?

996


What is a loop?

1073


Explain what are header files and explain what are its uses in c programming?

1161


Differentiate between #include<...> and #include '...'

1068


What is c language & why it is used?

1121


What is calloc() function?

1116


what are the advantages of a macro over a function?

1151


Is there a built-in function in C that can be used for sorting data?

1275


how to execute a program using if else condition and the output should enter number and the number is odd only...

2313


Explain what are the advantages and disadvantages of a heap?

1094