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 SWAP TWO NOS IN ONE STEP?

Answer Posted / amaresh chandra das

amaresh@Hare-Krishna:~$ cat swp.c
#include<stdio.h>
int
main(){
int a=5,b=6; // Compile using gcc -Wall
#ifdef DEBUG // to avoid compiler warnings
a ^=b^=a^=b;
#endif
printf("value of a is %d and b is %d\n",a,b);
return 0;
}

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the general form of function in c?

1022


p*=(++q)++*--p when p=q=1 while(q<=6)

1766


Who invented bcpl language?

1201


What do the functions atoi(), itoa() and gcvt() do?

1197


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1325


What are Macros? What are its advantages and disadvantages?

1168


What are linker error?

1103


What are header files in c?

1085


Describe the modifier in c?

1104


What is meant by keywords in c?

1074


Where are the auto variables stored?

1154


Explain how do you determine a file’s attributes?

1050


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2480


What is meant by initialization and how we initialize a variable?

1055


How can I remove the trailing spaces from a string?

1082