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

What is 02d in c?

1077


Is null a keyword in c?

1200


What would be an example of a structure analogous to structure c?

1002


What is the difference between pure virtual function and virtual function?

1133


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

2106


What is the difference between far and near in c?

1072


What does %c do in c?

1001


What is struct node in c?

1081


What is the main difference between calloc () and malloc ()?

1164


Can a variable be both const and volatile?

1139


write a program to generate address labels using structures?

4585


Explain what is the difference between functions getch() and getche()?

1060


can we implement multi-threads in c.

1138


What is the right type to use for boolean values in c?

1042


What are header files in c?

1085