How to swap two values using a single variable ?
condition: Not to use Array and Pointer ?
Answer Posted / aditya
main(){
int a=10,b=20;
printf("%d%d",a,b);
a^=b,b^=a,a^=b;
printf("%d%d",a,b);
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are keywords in c with examples?
Is anything faster than c?
What is the heap?
What is #define?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What is #line?
What is bubble sort in c?
How arrays can be passed to a user defined function
What is the meaning of typedef struct in c?
How can I recover the file name given an open stream?
How #define works?
For what purpose null pointer used?
What is the purpose of scanf() and printf() functions?
What is typedef?
provide an example of the Group by clause, when would you use this clause