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 / kabita shah

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x,y;
printf("enter two value");
scanf("%d%d",&x,&y);
x=x+y;
y=x-y;
x=x-y;
printf("value of x=%d",x);
printf("value of y=%d",y);
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1202


How do you determine whether to use a stream function or a low-level function?

1120


How many types of operator or there in c?

1089


Is main is a keyword in c?

1123


What are the different types of control structures in programming?

1124


Write a factorial program using C.

1072


Can i use “int” data type to store the value 32768? Why?

1187


What is boolean in c?

1088


Explain the array representation of a binary tree in C.

1225


Can I initialize unions?

1037


How can you determine the size of an allocated portion of memory?

1297


Explain how can I open a file so that other programs can update it at the same time?

1105


what are bit fields? What is the use of bit fields in a structure declaration?

2118


Can we use any name in place of argv and argc as command line arguments?

1065


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3946