write a program to swap Two numbers without using temp variable.
Answer Posted / niharika
class java
1.b=(a+b)-(a=b);
2.a^=b^=a^=b;
3.a=a+b;
b=a-b;
a=a-b;
4.a=a*b;
b=a/b;
a=a/b;
rohanraju143@gmail.com from NIT Waramgal
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are 'near' and 'far' pointers?
What are the types of data structures in c?
What is the equivalent code of the following statement in WHILE LOOP format?
What is the description for syntax errors?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
to find the closest pair
Which are low level languages?
What is the difference between exit() and _exit() function?
How can you access memory located at a certain address?
Explain how can you tell whether a program was compiled using c versus c++?
What does printf does?
What is LINKED LIST? How can you access the last element in a linked list?
What is the difference between local variable and global variable in c?
What is "Hungarian Notation"?