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
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
What is c basic?
What are void pointers in c?
What is a string?
Place the #include statement must be written in the program?
What is #define in c?
What are enums in c?
How many parameters should a function have?
What is the difference between c &c++?
What is function in c with example?
How is actual parameter different from the formal parameter?
Difference between linking and loading?
What are the 5 types of inheritance in c ++?
hi, which software companys will take,if d candidate's % is jst 55%?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers