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

what is the difference between call by value and call by
reference?

Answer Posted / mahesh

call by value
int fun(int a,int b);
int fun(int p,int q)
{
temp=p;
p=q;
q=temp;
}
call by reference
int fun(int &a,int &b);
int fun(int *a,int *b)
{
temp=*a;
*a=*b;
*b=temp;
}
call by value is with values n call by ref with adresses n
pointers...

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better pointer or array?

1023


Explain how can a program be made to print the line number where an error occurs?

1208


What does %p mean c?

1063


What is a program flowchart and how does it help in writing a program?

1137


Which type of language is c?

1073


What is a function in c?

1574


What is pointer to pointer in c language?

1139


can we have joblib in a proc ?

2300


What does stand for?

1080


What is the meaning of && in c?

1013


What is the collection of communication lines and routers called?

1120


Why is sprintf unsafe?

1071


What is an array? What the different types of arrays in c?

1179


If I have a char * variable pointing to the name of a function ..

1168


What is the scope of global variable in c?

989