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...

a C prog to swap 2 no.s without using variables just an
array?

Answer Posted / karthik

void main()
{
int a=10,b=20;
a^=b^=a^=b;
printf("a=%d,b=%d",a,b)
getch();
}

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1128


Is that possible to store 32768 in an int data type variable?

1139


What does stand for?

1141


What are the 5 data types?

1211


What are different types of pointers?

1109


What is array within structure?

1174


What are # preprocessor operator in c?

1170


How does selection sort work in c?

1099


What are c header files?

1037


What is the most efficient way to store flag values?

1232


What is the modulus operator?

1258


‎How to define structures? · ‎

1147


How can I do peek and poke in c?

1136


What are header files in c programming?

1182


What is an identifier?

1087