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 use of pointer?
When should the const modifier be used?
what do you mean by enumeration constant?
List the difference between a While & Do While loops?
Why is a semicolon (;) put at the end of every program statement?
Can the sizeof operator be used to tell the size of an array passed to a function?
What are unions in c?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What are the types of bitwise operator?
What does a pointer variable always consist of?
How is pointer initialized in c?
Why is c called a mid-level programming language?
Tell us two differences between new () and malloc ()?
What does stand for?
What is the general form of function in c?