How to swap two values using a single variable ?
condition: Not to use Array and Pointer ?
Answer Posted / aditya
main(){
int a=10,b=20;
printf("%d%d",a,b);
a^=b,b^=a,a^=b;
printf("%d%d",a,b);
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are the Advantages of using macro
Explain what are bus errors, memory faults, and core dumps?
What does stand for?
Can we compile a program without main() function?
What does calloc stand for?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
What is the purpose of main( ) in c language?
Which node is more powerful and can handle local information processing or graphics processing?
What is string constants?
simple program of graphics and their output display
What is spaghetti programming?
What does the format %10.2 mean when included in a printf statement?
What is main return c?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
How the c program is executed?