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 volatile variable in c with example?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What happens if a header file is included twice?
What is quick sort in c?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
What is wrong with this program statement? void = 10;
What is the return type of sizeof?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
how to find binary of number?
Explain about C function prototype?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
where are auto variables stored? What are the characteristics of an auto variable?
What is the difference between printf and scanf )?
Explain what is the difference between functions getch() and getche()?