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


how to swap two nubers by using a function with pointers?



how to swap two nubers by using a function with pointers?..

Answer / reshma

void swap(int *a, int *b)
{
int tmp;
tmp=*a;
*a=*b;
*b=tmp;
}

or

void swap(int *a, int *b)
{
*a=*a^*b;
*b=*a^*b;
*a=*a^*b;

}

Is This Answer Correct ?    10 Yes 1 No

Post New Answer

More C Interview Questions

What is identifiers in c with examples?

0 Answers  


What should not contain a header file?

2 Answers  


4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it. i have done maximum par but i m findind problem in the commented area. please help...

3 Answers  


What are the main characteristics of c language describe the structure of ac program?

0 Answers  


Not all reserved words are written in lowercase. TRUE or FALSE?

0 Answers  


write a program in c language to print your bio-data on the screen by using functions.

6 Answers   College School Exams Tests, IBM,


Why is c called c?

0 Answers  


What is pass by reference in c?

0 Answers  


Can two or more operators such as and be combined in a single line of program code?

0 Answers  


What is function definition in c?

0 Answers  


How do we open a binary file in Read/Write mode in C?

0 Answers   Alter,


wite a programme in c to linear search a data using flag and without using flags?

3 Answers   TCS,


Categories