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
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
How do you define a string?
Can we change the value of static variable in c?
Tell me can the size of an array be declared at runtime?
Can the curly brackets { } be used to enclose a single line of code?
How many levels of indirection in pointers can you have in a single declaration?
How can I get back to the interactive keyboard if stdin is redirected?
When should a type cast not be used?
What is a wrapper function in c?
What are the different categories of functions in c?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What does s c mean in text?
What the different types of arrays in c?
What are the similarities between c and c++?
What is main function in c?