Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / surendra jhajhra

int x,y;

x =x+y;
y =x-y;
x =x-y;

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of ftell?

1056


What is a constant and types of constants in c?

1093


What is the difference between union and structure in c?

1124


What is sizeof return in c?

1015


What are local static variables?

1111


In a switch statement, explain what will happen if a break statement is omitted?

1020


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1949


Is using exit() the same as using return?

1287


Why is c used in embedded systems?

1089


what are bit fields? What is the use of bit fields in a structure declaration?

2085


Explain what is a program flowchart and explain how does it help in writing a program?

1073


What are the types of data structures in c?

1110


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

2894


What is a void * in c?

1047


What is a structure in c language. how to initialise a structure in c?

1045