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

How can you determine the maximum value that a numeric variable can hold?

1241


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1943


What is the purpose of void in c?

1071


What is the difference between text and binary modes?

1200


Is null a keyword in c?

1201


Can we declare variable anywhere in c?

983


Why doesnt that code work?

1190


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3331


Explain the process of converting a Tree into a Binary Tree.

2683


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

1131


Explain a file operation in C with an example.

1127


What is the size of enum in c?

1122


What will be the outcome of the following conditional statement if the value of variable s is 10?

1303


What are the preprocessor categories?

1069


What is pivot in c?

1035