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 function which accept two numbers from main() and
interchange them using pointers?

Answer Posted / sarathi

#include<stdio.h>
main()
{
int *p,*q;
*p=10;
*q=20
void swap(int &p,int &q);
}
void swap(int *x,int *y);
{
int *tmp;
*tmp=*x;
*x=*y;
*y=*x;
printf("%d,%d",*x,*y);
}

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is identifier in c?

1009


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2176


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1819


Why calloc is better than malloc?

1033


Difference between exit() and _exit() function?

1132


what is the structure pointer?

2121


What are the similarities between c and c++?

1066


Does free set pointer to null?

1001


What is difference between constant pointer and constant variable?

1301


What does main () mean in c?

1095


Explain a file operation in C with an example.

1119


define string ?

1100


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

2576


Write the control statements in C language

1200


What does the characters “r” and “w” mean when writing programs that will make use of files?

1472