how to swap 2 numbers in a single statement?

Answer Posted / uj

(x ^= y), (y ^= x), (x ^= y);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a pointer variable in c language?

645


What the advantages of using Unions?

673


Explain what is the difference between far and near ?

652


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15504


What is chain pointer in c?

603






how to introdu5ce my self in serco

1521


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1267


How can I run c program?

688


Explain the use of bit fieild.

715


What is the best organizational structure?

644


Are global variables static in c?

676


How do you list a file’s date and time?

635


Differentiate between null and void pointers.

633


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

653


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

612