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

#include<stdio.h>
void main()
{
int a=2,b=3;
printf("before swap the value is:::");
printf("a=%d\tb=%d",a,b);
b=a+b-(a=b);
printf("after swap the value is:::");
printf("a=%d\tb=%d",a,b);
}

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When would you use a pointer to a function?

1010


What is storage class?

1026


Explain what is page thrashing?

1064


How can I call fortran?

1007


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2415


Is register a keyword in c?

1004


Compare interpreters and compilers.

1039


What math functions are available for integers? For floating point?

1100


What is malloc calloc and realloc in c?

1246


Explain the difference between call by value and call by reference in c language?

1074


What is c value paradox explain?

1046


What is the difference between the local variable and global variable in c?

941


How would you rename a function in C?

1014


What are the different types of constants?

1036


How do we make a global variable accessible across files? Explain the extern keyword?

1846