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 to write the code of the program to swap two numbers
with in one statement?

Answer Posted / rajitha

#include<stdio.h>
main()
{
int a=3,b=4;
b=a+b-(a=b);
printf("%d",a);
printf("%d",b);
}

Is This Answer Correct ?    19 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to find binary of number?

4374


Can true be a variable name in c?

1006


Does sprintf put null character?

1000


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1550


What are different types of pointers?

1026


What is the correct declaration of main?

1173


how to write a c program to print list of fruits in alpabetical order?

2253


What is the correct code to have following output in c using nested for loop?

1040


What does *p++ do? What does it point to?

1014


What are the advantages of using macro in c language?

1086


What does volatile do?

948


Why doesnt this code work?

1020


What is break in c?

997


Explain heap and queue.

1028


What is the symbol indicated the c-preprocessor?

1183