How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance

Answer Posted / manju

main()
{
int a=16,b=19;
a=a+b;
b=a-b;
a=a-b;
printf("a and b are:%d\t%d",a,b);
}

Output:
a and b are:19 16

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include stdio h and #include conio h?

605


How are portions of a program disabled in demo versions?

754


Is sizeof a keyword in c?

586


Why c is called a middle level language?

636


What is extern keyword in c?

648






What are unions in c?

585


What are dangling pointers? How are dangling pointers different from memory leaks?

630


Do pointers store the address of value or the actual value of a variable?

613


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.

630


Explain can you assign a different address to an array tag?

648


Explain the use of function toupper() with and example code?

657


What is scanf () in c?

666


Is exit(status) truly equivalent to returning the same status from main?

589


What is a volatile keyword in c?

643


What does 4d mean in c?

951