write a program to swap Two numbers without using temp variable.
Answer Posted / abhi
void swap(int *a,int *b)
{
if(*a == *b)
return;
*a^=*b;
*b^=*a;
*a^=*b;
}
Is This Answer Correct ? | 461 Yes | 195 No |
Post New Answer View All Answers
How can I find out how much free space is available on disk?
Why do we use c for the speed of light?
what do you mean by inline function in C?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Explain how are 16- and 32-bit numbers stored?
What’s a signal? Explain what do I use signals for?
What is s in c?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What is the easiest sorting method to use?
What is the difference between functions abs() and fabs()?
#include
What does return 1 means in c?
int i=10; printf("%d %d %d", i, i=20, i);
What is a static variable in c?