swapping of two numbers without using third variable using
AND and OR operators

Answer Posted / ramesh reddy

a = a^b; b =a^b; a =a^b;
or
a=a+b; b=a-b; a=a-b;

Is This Answer Correct ?    43 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

all c language question

1875


difference between Low, Middle, High Level languages in c ?

1634


What is context in c?

541


Explain 'bit masking'?

655


What is signed and unsigned?

646






Is it better to use malloc() or calloc()?

649


What are linker error?

614


What is difference between main and void main?

630


What is pointer and structure in c?

574


How can I pad a string to a known length?

612


Tell me the use of bit field in c language?

629


What is the difference between void main and main in c?

626


What is the symbol indicated the c-preprocessor?

696


Is null always equal to 0(zero)?

586


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

1600