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 in a single statement?

Answers were Sorted based on User's Feedback



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

Answer / ushagva1

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

Is This Answer Correct ?    21 Yes 2 No

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

Answer / uj

(x ^= y), (y ^= x), (x ^= y);

Is This Answer Correct ?    0 Yes 0 No

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

Answer / pedda

t=a;
a=b;
b=t;
t means temporary value

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More C Interview Questions

What is the difference b/w main() in C language and main() in C++.

7 Answers  


What is the difference between new and malloc functions?

0 Answers   InterGraph,


Explain what is the stack?

0 Answers  


What is difference between && and & in c?

0 Answers  


#include <stdio.h> void main() { int i=-1,j=1,k,l; k=!i&&j; l=!i||j; printf ("%d%d",k,l) ; }

3 Answers   SRG,


wap to print "hello world" without using the main function.

22 Answers   TCS, Wipro,


Write a pro-gramme to determine whether the number is even or odd?

1 Answers  


Differentiate b/w Modify and Update commands giving example.

1 Answers  


Can the curly brackets { } be used to enclose a single line of code?

0 Answers  


What are the difference between a free-standing and a hosted environment?

0 Answers   Infogain,


consider the following structure: struct num nam{ int no; char name[25]; }; struct num nam n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}}; ..... ..... printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1); What does the above statement print? a.8,9 b.9,9 c.8,8 d.8,unpredictable value

4 Answers   TCS,


Who developed c language?

0 Answers  


Categories