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

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf ("enter the values to a & b");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("%d%d",a,b);
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can I write functions that take a variable number of arguments?

1083


Can you write the function prototype, definition and mention the other requirements.

1139


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1102


What does. int *x[](); means ?

1070


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1887


Explain the properties of union. What is the size of a union variable

1190


When should the const modifier be used?

1117


What is pointer and structure in c?

1187


What are the types of pointers in c?

1029


What are the advantages of external class?

1071


Is sizeof a keyword in c?

973


Which is the best website to learn c programming?

1082


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1768


Is null a keyword in c?

1198


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

1135