write a program to swap Two numbers without using temp variable.
Answer Posted / guest
using xor technique is much faster than using addition and
subtraction process , and xor instruction is much simpler at
processor level.
so be simply
x = x xor y
y = x xor y
x = x xor y
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is c language used for?
Write a program to check armstrong number in c?
What is break in c?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
Explain the advantages and disadvantages of macros.
What is quick sort in c?
How to explain the final year project as a fresher please answer with sample project
Which built-in library function can be used to match a patter from the string?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
What is the use of #define preprocessor in c?
What type is sizeof?
What is the size of array float a(10)?
What is the difference between exit() and _exit() function?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
what do you mean by enumeration constant?