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...

write a program to swap Two numbers without using temp variable.

Answer Posted / ravi saini

void main()
{
int a,b;
printf("enter the two numbers");
scanf("%d%d",&a,&b);
a^=b^=a^=b;
printf("%d%d",a,b);//swapped no
}

Is This Answer Correct ?    119 Yes 66 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is javascript written in c?

1115


In which layer of the network datastructure format change is done

1940


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

2061


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2127


Can you subtract pointers from each other? Why would you?

1005


If errno contains a nonzero number, is there an error?

1428


Explain logical errors? Compare with syntax errors.

1126


Describe explain how arrays can be passed to a user defined function

1162


Is there a way to jump out of a function or functions?

1163


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1734


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1969


What is the difference between arrays and pointers?

1174


What are lookup tables in c?

1033


What are the key features in c programming language?

1124


What is a pointer value and address in c?

1179