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 / karthik

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

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the loops in c?

999


What does void main return?

1133


What is else if ladder?

1029


What is a macro, and explain how do you use it?

1086


How do I copy files?

1068


Write a function that will take in a phone number and output all possible alphabetical combinations

1056


What is function prototype in c language?

1040


How can you pass an array to a function by value?

1132


How to compare array with pointer in c?

1118


Is that possible to add pointers to each other?

1379


What standard functions are available to manipulate strings?

1161


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1085


How do you list files in a directory?

1154


Explain what are compound statements?

1068


What is structure of c program?

1173