Write a program to exchange two variaables without temp

Answer Posted / kadher

void main()
{
int a=10,b=5;
a=a^b;
b=a^b;
a=a^b;

}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to display all prime numbers

1454


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

683


In which language linux is written?

602


What is the purpose of & in scanf?

596


What is main return c?

518






What does & mean in scanf?

601


Give differences between - new and malloc() , delete and free() ?

610


Is using exit() the same as using return?

676


What is dynamic dispatch in c++?

556


Is javascript based on c?

595


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

1674


What is the use of #define preprocessor in c?

615


What language is lisp written in?

618


Explain how can you tell whether a program was compiled using c versus c++?

578


in linking some of os executables are linking name some of them

1650