write a program to swap Two numbers without using temp variable.

Answer Posted / raghavendra

a=3;
b=2;
a=a^b;
b=a^b;
a=a^b;
printf("%d%d",a,b);

Is This Answer Correct ?    34 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between static and global variable in c?

523


What is the use of printf() and scanf() functions?

616


What is the difference between %d and %i?

576


Explain 'bus error'?

545


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

1715






What are local static variables? How can you use them?

633


Explain what are multibyte characters?

612


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

649


What are register variables? What are the advantage of using register variables?

665


How will you find a duplicate number in a array without negating the nos ?

1626


What does & mean in scanf?

589


What are the c keywords?

736


Is that possible to add pointers to each other?

883


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

1972


Explain what are multidimensional arrays?

590