Answer Posted / amaresh chandra das
amaresh@Hare-Krishna:~$ cat swp.c
#include<stdio.h>
int
main(){
int a=5,b=6; // Compile using gcc -Wall
#ifdef DEBUG // to avoid compiler warnings
a ^=b^=a^=b;
#endif
printf("value of a is %d and b is %d\n",a,b);
return 0;
}
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What is the general form of function in c?
p*=(++q)++*--p when p=q=1 while(q<=6)
Who invented bcpl language?
What do the functions atoi(), itoa() and gcvt() do?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
What are Macros? What are its advantages and disadvantages?
What are linker error?
What are header files in c?
Describe the modifier in c?
What is meant by keywords in c?
Where are the auto variables stored?
Explain how do you determine a file’s attributes?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What is meant by initialization and how we initialize a variable?
How can I remove the trailing spaces from a string?