How to swap 3 numbers without using 4th variable?
Answers were Sorted based on User's Feedback
Answer / ilana
The target is a<-b b<-c c<- a
------------------------------------
a = a+b+c ; // a+b+c b c
c = c+b; // a+b+c b b+c
b = c-b; // a+b+c c b+c
c = a-c; // a+b+c c a
a = a-(b+c) // b c a
| Is This Answer Correct ? | 12 Yes | 7 No |
I have a varargs function which accepts a float parameter?
What is structure in c definition?
Write a program to exchange two variaables without temp
What is scope rule of function in c?
Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.
What does static mean in c?
what is the difference between NULL & NUL keywords in C?
What is function prototype?
What is the use of typedef in c?
pgm to find middle element of linklist(in efficent manner)
what is difference b/w extern & volatile variable??
What are dangling pointers? How are dangling pointers different from memory leaks?