write a program to swap Two numbers without using temp variable.

Answer Posted / prasanna

Swapping two variables in a single line with no temporary
variable..

b=(a+b)-(a=b);

so.. simple..

Prasanna. (prasanna7287@yahoo.co.in)

Is This Answer Correct ?    351 Yes 140 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of #pragma exit?

703


What are extern variables in c?

553


What is meant by realloc()?

682


What are the advantages of the functions?

610


which is an algorithm for sorting in a growing Lexicographic order

1403






What are the characteristics of arrays in c?

618


What is the difference between typedef struct and struct?

604


What is scope rule of function in c?

556


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2273


How to declare a variable?

575


What are header files and what are its uses in C programming?

642


What is #include in c?

604


Do you know the purpose of 'register' keyword?

648


Explain c preprocessor?

687


Which is better oop or procedural?

638