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...

a C prog to swap 2 no.s without using variables just an
array?

Answer Posted / baidyanath bisoyi

void main()
{
int a,b;
printf("enter the two numbers\n");
scanf("%d%d",&a,&b);
printf("a=%d\n b=%d\n",a,b);
a=a+b-(b=a);
printf("a=%d\n b=%d\n",a,b);
getch();
}

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

largest Of three Number using without if condition?

1550


What is variable initialization and why is it important?

1188


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1051


How can I manipulate individual bits?

1004


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

992


What are identifiers and keywords in c?

1054


Differentiate fundamental data types and derived data types in C.

999


the question is that what you have been doing all these periods (one year gap)

2039


Write a program to generate the Fibinocci Series

1185


What is sorting in c plus plus?

947


What does != Mean in c?

1005


Tell us something about keyword 'auto'.

1025


Explain how do you view the path?

1122


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1910


What is #include stdio h and #include conio h?

1066