how to swap two strings without using any third variable ?
Answer Posted / ashutosh
say a = 10 and b = 20;
b = a + b;// b= 30
a = b - a;// a= 20
b = b - a;// b= 10
so now a = 20 b= 10
| Is This Answer Correct ? | 27 Yes | 16 No |
Post New Answer View All Answers
What's the hardest coding language?
Show the declaration for a static function pointer.
What is class syntax c++?
Do we have to use initialization list in spite of the assignment in constructors?
What are stacks? Give an example where they are useful.
What is near, far and huge pointers? How many bytes are occupied by them?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
Write a recursive program to calculate factorial in c++.
What does asterisk mean in c++?
How much maximum can you allocate in a single call to malloc()?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
What is a constructor in c++ with example?
Is c++ used anymore?
Differentiate between the message and method in c++?
What is the use of 'this' pointer?