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 / joshin

main()
{
printf("enter two number");
scanf("%d%d",&a,&b);
printf("swaped result is b=%d\na=%d",b,a);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main characteristics of c language describe the structure of ac program?

1208


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1088


Can a void pointer point to a function?

1018


Why dont c comments nest?

1045


Where is c used?

1092


How do I round numbers?

1008


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

2751


What are the standard predefined macros?

1139


What is pointer in c?

1190


If null and 0 are equivalent as null pointer constants, which should I use?

1210


Why we write conio h in c?

1027


What's a good way to check for "close enough" floating-point equality?

1155


What is the function of this pointer?

1328


What is huge pointer in c?

1082


Is it fine to write void main () or main () in c?

1025