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 prgram of swapping with 2 valiables

Answer Posted / eranna kybarshi

#include<stdio.h>
#include<conio.h>
void main()
{
int x,y;
clrscr();

printf("Enter 'x' value :");
scanf("%d",&x);

printf("\nEnter 'y' value :");
scanf("%d",&y);

x=x+y;
y=x-y;
x=x-y;
printf("\nAfter swaping x= %d,y= %d ",x,y);

getch();
}

Is This Answer Correct ?    20 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the height of tree if leaf node is at level 3. please explain

2088


Is sizeof a keyword in c?

918


What do you mean by Recursion Function?

1070


What is getch () for?

1149


Tell me what is null pointer in c?

1013


What is infinite loop?

1029


What is meant by preprocessor in c?

948


How do we make a global variable accessible across files? Explain the extern keyword?

1827


explain what are actual arguments?

1032


What are the advantages of c language?

1042


Explain #pragma statements.

979


Can you assign a different address to an array tag?

1110


What is c preprocessor mean?

1243


Why void main is used in c?

999


What does %d do in c?

911