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 are the key features in c programming language?

1026


Are there any problems with performing mathematical operations on different variable types?

1013


What is dynamic memory allocation?

1309


What is huge pointer in c?

1040


Define Array of pointers.

1063


Explain what does the format %10.2 mean when included in a printf statement?

1316


How do I convert a string to all upper or lower case?

1073


What is array in C

1113


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2827


What are global variables and how do you declare them?

1037


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

2050


What are the 4 data types?

985


What is page thrashing?

1040


Why c is called object oriented language?

1024


can anyone please tell about the nested interrupts?

2089