how to swap two numbers with out using temp variable

Answer Posted / arundhati

a^=b^=a^=b;

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 math h in c++?

689


What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?

725


Can we use this pointer in a class specific, operator-overloading function for new operator?

696


Explain how the virtual base class is different from the conventional base classes of the opps.

793


What is the first name of c++?

664






What are the five basic elements of a c++ program?

690


How does the copy constructor differ from the assignment operator (=)?

715


What is the difference between a declaration and a definition?

664


What are compilers in c++?

700


What is a dynamic binding in c++?

604


Why do we use iterators?

718


What is a constant reference?

704


What does asterisk mean in c++?

672


How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

655


How a pointer differs from a reference?

810