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

Explain spaghetti programming?

1189


Can a function argument have default value?

1092


What are register variables? What are the advantage of using register variables?

1128


Explain how do you generate random numbers in c?

1043


Define recursion in c.

1200


what is the significance of static storage class specifier?

2185


Explain the difference between malloc() and calloc() in c?

1005


Write a program to find factorial of a number using recursive function.

1066


what is uses of .net

1684


Is multithreading possible in c?

950


Are bit fields portable?

1108


what is a constant pointer in C

1095


When should I declare a function?

1055


Calculate 1*2*3*____*n using recursive function??

1982


What is cohesion and coupling in c?

984