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

Explain "passing by value", "passing by pointer" and
"passing by reference" ?

Answer Posted / sampurna pandey

i am not agree with Ranjeet, you mention this

main()
{
int i;
func(i); // call by reference
}

but fun(i) is a call by value not call by reference

your code will give compile error.

Ven eample is right.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the fastest c++ compiler?

1048


Which one between if-else and switch is more efficient?

1031


What is auto type c++?

1086


What is problem with overriding functions?

1018


What are the various situations where a copy constructor is invoked?

1087


Why cout is used in c++?

986


What are member functions used in c++?

1097


What is object file? How can you access object file?

1142


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2435


What is virtual table?

1065


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

1187


Which is not a valid keyword a) public b) protected c) guarded

1208


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

1017


What is c++ used for in games?

1114


What is a forward referencing and when should it be used?

1116