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

Answer Posted / prashant

b=a+b;
a=b-a;
b=b-a;

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 local and global variable in c?

610


largest Of three Number using without if condition?

993


What is the best style for code layout in c?

624


Explain what are preprocessor directives?

616


State the difference between x3 and x[3].

642






Is it possible to execute code even after the program exits the main() function?

801


Explain what is the benefit of using #define to declare a constant?

599


Why is c faster?

582


Why is structure important for a child?

597


Explain the properties of union.

603


Is return a keyword in c?

590


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1312


What is scanf_s in c?

623


Explain indirection?

633


How to create struct variables?

581