write a program to swap Two numbers without using temp variable.
Answer Posted / nagarjun
main()
{
int a=4,b=5;
/*b=(a+b)-(a=b);*/
a^=b^=a^=b;
printf(" \n %d %d \n",a,b);
}
| Is This Answer Correct ? | 21 Yes | 28 No |
Post New Answer View All Answers
What is the use of linkage in c language?
Is null equal to 0 in sql?
Are the variables argc and argv are always local to main?
What are the types of i/o functions?
What is a sequential access file?
What are comments and how do you insert it in a C program?
What are the types of assignment statements?
how can f be used for both float and double arguments in printf? Are not they different types?
The difference between printf and fprintf is ?
what will be the output for the following main() { printf("hi" "hello"); }
How can you tell whether two strings are the same?
Explain the meaning of keyword 'extern' in a function declaration.
What are operators in c?
What is structure data type in c?
Why we use stdio h in c?