write a program to swap Two numbers without using temp variable.
Answer Posted / amar
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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
Do pointers store the address of value or the actual value of a variable?
What is getche() function?
What does the file stdio.h contain?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Does c have enums?
Explain what is page thrashing?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
Why cant I open a file by its explicit path?
Why is extern used in c?
Explain about C function prototype?
What is dynamic variable in c?
Explain how do you override a defined macro?
Why do we need functions in c?
Why static is used in c?