write a program to swap Two numbers without using temp variable.
Answer Posted / yash paranjape
int main()
{
int a,b;
printf("enter the two numbers");
scanf("%d%d",&a,&b);
a^=b^=c^=a;//swap a and b
printf("%d%d",a,b);//numbers r swapped
}
| Is This Answer Correct ? | 82 Yes | 189 No |
Post New Answer View All Answers
Why C language is a procedural language?
What is a program?
Write the test cases for checking a variable having value in range -10.0 to +10.0?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
write a program for the normal snake games find in most of the mobiles.
What are the applications of c language?
Write a program to generate random numbers in c?
What is the role of this pointer?
What are data types in c language?
How can you draw circles in C?
C language questions for civil engineering
Explain how do you determine the length of a string value that was stored in a variable?
why programs in c are running with out #include
What is the difference between struct and union in C?
Write a program to swap two numbers without using a temporary variable?