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 / jaspreet singh

void main()
{
int a[2]={20,10};
a[0]=a[0]^a[1];
a[1]=a[0]^a[1];
a[0]=a[0]^a[1];
printf("a=%d,b=%d",a[0],a[1])
getch();
}

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

2109


c program to compute AREA under integral

2414


Is c pass by value or reference?

1049


What is the difference between procedural and functional programming?

1087


What is difference between %d and %i in c?

1248


What is hashing in c?

1166


Compare and contrast compilers from interpreters.

1126


What are the types of data types and explain?

1095


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

1073


What are examples of structures?

1120


What is huge pointer in c?

1097


write a program to generate address labels using structures?

4586


How can you draw circles in C?

1158


What is the use of c language in real life?

1031


provide an example of the Group by clause, when would you use this clause

2201