write a program to swap Two numbers without using temp variable.
Answer Posted / swechha
a=a-b
b=a+b
a=b-a
if a=5 and b=10 then
a=5-10=(-5)
b=(-5)+10=5
a=5-(-5)=5+5=10
now a=10 & b=5
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you mean by keywords in c?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
What is void main () in c?
What are data structures in c and how to use them?
What is const and volatile in c?
What is the use of ?: Operator?
What is c value paradox explain?
What are the functions to open and close file in c language?
What is pointers in c?
How can I make sure that my program is the only one accessing a file?
What is the use of static variable in c?
Hi can anyone tell what is a start up code?
What are the preprocessor categories?
What are the storage classes in C?
Why is c still so popular?