How many ways are there to swap two numbers without using
temporary variable? Give the each logic.

Answer Posted / kk

three logic
xor -> a^=b^=a^=b;
addition and subtraction,
multiply and division .......

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the modulus operator?

740


How do you define a string?

658


What is difference between structure and union in c programming?

572


Is anything faster than c?

587


Can a variable be both static and volatile in c?

610






What is omp_num_threads?

587


What is the use of clrscr?

599


What does %p mean c?

634


For what purpose null pointer used?

609


What is your stream meaning?

610


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2374


Difference between goto, long jmp() and setjmp()?

712


Explain setjmp()?

661


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1214


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1635