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

#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c,d;
cout<<"\n enter a:";
cin>>a;
cout<<"\n enter b:";
cin>>b;
c=a+b;
d=a-b;
c=a-b;
cout<<"\n answer a :"<<c;
cout<<"\n answer b:"<<d;
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does %p mean c?

1115


Can we declare a function inside a function in c?

1094


What is linear search?

1176


How can I manipulate individual bits?

1095


What do you mean by recursion in c?

1161


Explain about C function prototype?

1139


Explain that why C is procedural?

1190


What are inbuilt functions in c?

1080


What is the heap?

1258


How pointers are declared?

1008


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2621


What is pragma in c?

1281


What is calloc()?

1129


Are pointers integer?

1071


Differentiate Source Codes from Object Codes

1656