How to swap 3 numbers without using 4th variable?

Answer Posted / sundar

a=a+b+c
b=a-(b+c)
c=a-(b+c)
a=a-(b+c)

Is This Answer Correct ?    89 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 2c dna?

596


Is null a keyword in c?

728


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2193


Why is %d used in c?

559


How can I copy just a portion of a string?

808






what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

663


How macro execution is faster than function ?

658


Explain 'far' and 'near' pointers in c.

695


Can you add pointers together? Why would you?

634


What is keyword with example?

624


What is meant by errors and debugging?

639


what is the basis for selection of arrays or pointers as data structure in a program

3780


Can you write the algorithm for Queue?

1544


What is the use of gets and puts?

590


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

1621