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


how to swap 2 numbers within a single statement?

Answers were Sorted based on User's Feedback



how to swap 2 numbers within a single statement?..

Answer / ushabharath

a=a+b-(b=a);

Is This Answer Correct ?    27 Yes 8 No

how to swap 2 numbers within a single statement?..

Answer / srinidhi

a=(a+b)-(b=a);

Is This Answer Correct ?    10 Yes 2 No

how to swap 2 numbers within a single statement?..

Answer / raja

a^=b^=a^=b;

Is This Answer Correct ?    6 Yes 1 No

how to swap 2 numbers within a single statement?..

Answer / ratishchandra huidrom

if(c=a&&a=b&&b=c)printf("%d %d",a,b);

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C Interview Questions

what are the different storage classes in c?

0 Answers   TCS,


What is the importance of c in your views?

0 Answers  


Can we declare variable anywhere in c?

0 Answers  


What is the difference between union and anonymous union?

0 Answers   Hexaware,


accept character from keyboard untill the user presses the enter key.If the user enters any character other than upper case(A-Z)alphabets program should stop taking any input

1 Answers  


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

0 Answers  


What is the purpose of the code, and is there any problem with it? unsigned int f( unsigned n ) { return –n & 7; }

1 Answers   Google,


What is data types?

0 Answers  


Do variables need to be initialized?

0 Answers  


the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i",i); return 0; }

4 Answers   CMC, TCS,


How can I read and write comma-delimited text?

0 Answers  


What is a void pointer in c?

0 Answers  


Categories