write a program to swap Two numbers without using temp variable.
Answer Posted / prudhvi
int a, b, c;
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = b;
b = a;
a = c;
Console.WriteLine("a={0},b={1}",a,b);
Console.ReadLine();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Explain the ternary tree?
What is bin sh c?
Can you pass an entire structure to functions?
what is the format specifier for printing a pointer value?
Is null a keyword in c?
What are the complete rules for header file searching?
What are the __date__ and __time__ preprocessor commands?
What is function prototype in c language?
Tell us something about keyword 'auto'.
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
Is a pointer a kind of array?
When was c language developed?
What is scope of variable in c?
What kind of structure is a house?
What is a node in c?