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 is difference between array and structure in c?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
what is the basis for selection of arrays or pointers as data structure in a program
Why c is called top down?
How can I read data from data files with particular formats?
How does pointer work in c?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
What is the size of enum in c?
What is getch () for?
Why header files are used?
What the different types of arrays in c?
What are the advantage of c language?
what is use of malloc and calloc?
Describe the modifier in c?
Where are local variables stored in c?