how to swap two integers 1 and 32767 without using third
variable
Answer Posted / riya ganguly
int a=1,b=32767;
a=a+b;
b=a-b;
a=a-b;
printf("a=%d,b=%d",a,b);
Is This Answer Correct ? | 17 Yes | 5 No |
Post New Answer View All Answers
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
How would you rename a function in C?
Define C in your own Language.
How do you use a pointer to a function?
What are the application of void data type in c?
What is a structural principle?
How many keywords are there in c?
I heard that you have to include stdio.h before calling printf. Why?
Explain how to reverse singly link list.
What is pragma in c?
Array is an lvalue or not?
What is the purpose of scanf() and printf() functions?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
What is scope rule in c?
What are near, far and huge pointers?