how to swap two integers 1 and 32767 without using third
variable

Answer Posted / vidhubala-j

int a=1
int b=32767
a^=b^=a
printf("%d %d",a,b);

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between new and malloc functions?

572


What is c language used for?

551


What is masking?

629


What do you mean by invalid pointer arithmetic?

632


is it possible to create your own header files?

631






program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

2570


What is LINKED LIST? How can you access the last element in a linked list?

629


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

3685


Explain what is the difference between the expression '++a' and 'a++'?

623


write a c program for swapping two strings using pointer

2088


difference between object file and executable file

6088


Why is c still so popular?

608


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2512


What is echo in c programming?

551


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

1836