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 |
who is the founder of c
19 Answers College School Exams Tests, HP,
I have a function which accepts, and is supposed to initialize,a pointer, but the pointer in the caller remains unchanged.
Explain the difference between call by value and call by reference in c language?
Can you think of a logic behind the game minesweeper.
no consistent academics. how to answer the question
What do you mean by command line argument?
What is gets() function?
write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?
What will be the output of following program #include main() { int x,y = 10; x = y * NULL; printf("%d",x); }
Why can’t we compare structures?
What is the use of the function in c?
Program to find the value of e raised to power x using while loop