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 |
What are actual arguments?
What is use of pointer?
main() { printf("hello%d",print("QUARK test?")); }
what is the maximum limit of row and column of a matrix in c programming. in linux .
How do you initialize pointer variables?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a<b,printb.find the sum digits of that number & then print.if a==b multiply 10 with a & add 20 with b store in c and then print
What are multibyte characters?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database
2 Answers TCS, Unisys, Webyog,
What is the 'named constructor idiom'?
How a string is stored in c?
What are the back slash character constants or escape sequence charactersavailable in c?
what value is returned to operating system after program execution?