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

#include<stdio.h>
#include<conio.h>
void main()
{

int a,b;
printf("enter two nos A and B\n");
scanf("%d%d",a,b);
printf("before swaping A=%d\n B=%d\n",a,b);
a=a+b:
b=a-b;
a=a-b;
prinf("after swaping A=%d\n B=%d\n",a,b);
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 is static identifier?

1280


Why is c called "mother" language?

1328


What do you mean by command line argument?

1225


What is a MAC Address?

1122


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

1163


Explain the use of keyword 'register' with respect to variables.

1096


How can I read and write comma-delimited text?

1123


How arrays can be passed to a user defined function

1069


What are the different data types in C?

1247


Is anything faster than c?

1060


Explain what’s a signal? Explain what do I use signals for?

1246


List some of the static data structures in C?

1240


How can you call a function, given its name as a string?

1207


How are structure passing and returning implemented?

1086


What is assert and when would I use it?

1061