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

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

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

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

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

getch();
}

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does printf does?

1261


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

1031


Can we initialize extern variable in c?

1147


What is c variable?

1051


What is c token?

1080


Write a code to generate a series where the next element is the sum of last k terms.

1238


What are the types of pointers in c?

1035


How can you tell whether two strings are the same?

1267


What is new line escape sequence?

1362


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

2155


Can the “if” function be used in comparing strings?

1063


Is there a way to compare two structure variables?

1132


What is atoi and atof in c?

1091


Where are local variables stored in c?

1052


In C, What is the #line used for?

2229