HOW TO SWAP TWO NOS IN ONE STEP?

Answer Posted / ashik

#define swap(a,b) a^=b^=a^=b;

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a variable be both static and volatile in c?

596


What does the && operator do in a program code?

686


How can you check to see whether a symbol is defined?

583


Is anything faster than c?

575


Can the size of an array be declared at runtime?

595






What is c language in simple words?

582


What is structure in c explain with example?

623


When would you use a pointer to a function?

578


Difference between goto, long jmp() and setjmp()?

695


Explain what are binary trees?

600


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

605


Explain what is the benefit of using const for declaring constants?

602


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

620


What is the purpose of scanf() and printf() functions?

706


What happens if you free a pointer twice?

594