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

# include "stdio.h"
main()
{
int a,b;
printf("enter two numbers for swaping");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is %d",a);
printf("b is %d",b);
} output:- takea,b value is 2,3 and give answers is3,2

Is This Answer Correct ?    243 Yes 58 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is multithreading possible in c?

1002


What is the difference between if else and switchstatement

1924


What is the right type to use for boolean values in c? Is there a standard type?

1002


What is assert and when would I use it?

993


Explain what is wrong with this program statement?

1112


What is an arrays?

1068


What is wild pointer in c?

1066


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1853


How do I read the arrow keys? What about function keys?

1074


Write a simple code fragment that will check if a number is positive or negative.

1143


What is the ANSI C Standard?

1265


Explain what’s a signal? Explain what do I use signals for?

1145


What is the use of sizeof?

1009


How do c compilers work?

1114


What is dynamic memory allocation?

1329