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
What is a string?
What is const keyword in c?
What are the 5 elements of structure?
What is break in c?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
Explain do array subscripts always start with zero?
What is the use of #include in c?
Which is better pointer or array?
What is the difference between #include and #include 'file' ?
Is stack a keyword in c?
Explain how are portions of a program disabled in demo versions?
What is the use of putchar function?
What are run-time errors?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What is a static function in c?