write a program to swap Two numbers without using temp variable.
Answer Posted / ravi saini
void main()
{
int a,b;
printf("enter the two numbers");
scanf("%d%d",&a,&b);
a^=b^=a^=b;
printf("%d%d",a,b);//swapped no
}
| Is This Answer Correct ? | 119 Yes | 66 No |
Post New Answer View All Answers
What does the error message "DGROUP exceeds 64K" mean?
Compare array data type to pointer data type
What is "Duff's Device"?
What is realloc in c?
Explain why c is faster than c++?
Is array name a pointer?
What does != Mean in c?
Is c++ based on c?
How to establish connection with oracle database software from c language?
write a program to rearrange the array such way that all even elements should come first and next come odd
c language interview questions & answer
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Is file a keyword in c?
What is extern storage class in c?
What is "Hungarian Notation"?