how to swap two numbers with out using temp variable
Answer Posted / kusum
if (a>b)
temp=a;
a=b;
b=temp;
| Is This Answer Correct ? | 0 Yes | 21 No |
Post New Answer View All Answers
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
What do you mean by early binding?
What is a c++ class?
What is fflush c++?
How does the copy constructor differ from the assignment operator (=)?
Why main function is special in c++?
What is the difference between method overloading and method overriding in c++?
How can we check whether the contents of two structure variables are same or not?
What is implicit pointer in c++?
What is the purpose of the "delete" operator?
How compile and run c++ program in turbo c++?
What is scope operator in c++?
What is atoi in c++?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
what is C++ exceptional handling?