write a program to swap two numbers without using temporary
variable?
Answer Posted / sam
let a and b be variables
a^=b^=a^=b;
by performing this logic from right hand side we can swap
two variables
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
What are directives in c?
Write a program to swap two numbers without using the third variable?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
what are the different storage classes in c?
What is conio h in c?
What is a lookup table in c?
What is a null pointer in c?
What is array of structure in c?
how could explain about job profile
What is union in c?
What are keywords in c with examples?
Why does everyone say not to use gets?
Create a simple code fragment that will swap the values of two variables num1 and num2.
Explain what is wrong with this program statement? Void = 10;
How do we make a global variable accessible across files? Explain the extern keyword?