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 would be the output of the following program? main() { int k = 123; char *ptr; ptr = &k; printf("%d",*ptr); }

4 Answers  


What is the value of c?

0 Answers  


what is the hexidecimal number of 4100?

16 Answers   Google,


related proverb of "dont count your chicken before it hatches"

1 Answers  


Do variables need to be initialized?

0 Answers  


how c source file in converted to exe file

5 Answers   KPIT,


formula to convert 2500mmh2o into m3/hr

0 Answers  


What is double pointer in c?

0 Answers  


What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?

2 Answers  


What are the basic data types associated with c?

0 Answers  


write a c program to find reminder and quotient if one number is divided by other.to code this program don't use more than 2 variables

2 Answers   TCS,


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

0 Answers   TCS,


Categories