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

write a program to swap Two numbers without using temp variable.

Answer Posted / nagarjun

main()
{
int a=4,b=5;
/*b=(a+b)-(a=b);*/
a^=b^=a^=b;
printf(" \n %d %d \n",a,b);
}

Is This Answer Correct ?    21 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of linkage in c language?

1055


Is null equal to 0 in sql?

1146


Are the variables argc and argv are always local to main?

1020


What are the types of i/o functions?

1333


What is a sequential access file?

1168


What are comments and how do you insert it in a C program?

1243


What are the types of assignment statements?

1061


how can f be used for both float and double arguments in printf? Are not they different types?

1062


The difference between printf and fprintf is ?

1279


what will be the output for the following main() { printf("hi" "hello"); }

10988


How can you tell whether two strings are the same?

1250


Explain the meaning of keyword 'extern' in a function declaration.

1154


What are operators in c?

1022


What is structure data type in c?

1013


Why we use stdio h in c?

1028