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 is event driven software and what is procedural driven software?

2507


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1676


what is the difference between 123 and 0123 in c?

1155


Why do we use namespace feature?

1007


What are the different file extensions involved when programming in C?

1202


What is .obj file in c?

1021


What are the 5 types of inheritance in c ++?

961


Explain how do you convert strings to numbers in c?

1020


plz let me know how to become a telecom protocol tester. thank you.

2138


Are global variables static in c?

1107


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2702


What does void main return?

1066


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1159


develop algorithms to add polynomials (i) in one variable

2107


Write a program to print fibonacci series using recursion?

1005