write a program to swap Two numbers without using temp variable.
Answer Posted / anantha
b=a+b
a=b-a
b=b-a
if a=3 and b=5
then now b=a+b=8
and a=8-a=8-3=5,now a=5
b=8-a=8-5=3,now b=3
so, a=5 and b=3
| Is This Answer Correct ? | 198 Yes | 59 No |
Post New Answer View All Answers
Explain what is a pragma?
What is pragma c?
What is the size of enum in bytes?
What is the method to save data in stack data structure type?
What is a protocol in c?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
How can you call a function, given its name as a string?
What is #define in c?
how could explain about job profile
What are valid signatures for the Main function?
Write a program for Overriding.
How do you do dynamic memory allocation in C applications?
What does %c mean in c?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
Do you have any idea how to compare array with pointer in c?