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 is assert and when would I use it?
can anyone please tell about the nested interrupts?
What is the difference between typedef struct and struct?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Is void a keyword in c?
How do you print an address?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is openmp in c?
What is the code for 3 questions and answer check in VisualBasic.Net?
How do you view the path?
Why is c platform dependent?
Is r written in c?
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
What is the need of structure in c?
What is header file definition?