write a program to swap two numbers without using temporary
variable?

Answer Posted / sam

let a and b be variables
a^=b^=a^=b;
by performing this logic from right hand side we can swap
two variables

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can a program be made to print the line number where an error occurs?

694


What is the method to save data in stack data structure type?

603


What is the difference between functions getch() and getche()?

618


What are valid operations on pointers?

666


What is the use of bit field?

638






How do you use a pointer to a function?

632


What is the deal on sprintf_s return value?

641


Is sizeof a keyword in c?

577


code for quick sort?

1622


What is pointer to pointer in c with example?

547


Explain how do you declare an array that will hold more than 64kb of data?

903


Is a house a mass structure?

639


How can I recover the file name given an open stream?

552


Which is better pointer or array?

597


Explain the array representation of a binary tree in C.

726