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 do you mean by call by value and call by reference?

Answer Posted / hr@tgksolutions.com

A common topic that often appears in C++ interview questions is the difference between call by value and call by reference.
• Call by Value in C++: In the call-by-value method, function arguments are passed by copying the value of the actual parameter.
• This ensures that the original values remain unchanged since a separate copy of the value is created for the function's parameters.
• Call by Reference in C++: In the call-by-reference method, the memory address (or reference) of the actual parameter is passed to the function.
• This allows direct access to and modification of the original values.
• Both the actual and formal parameters refer to the same memory address, so any changes made to the parameters within the function are directly reflected in the original values outside the function.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c++ is better than c?

905


What is extern c++?

937


Can a list of string be stored within a two dimensional array?

956


What is a constant? Explain with an example.

949


What is class invariant in c++?

1163


How can we check whether the contents of two structure variables are same or not?

1014


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1157


the first character in the variable name must be an a) special symbol b) number c) alphabet

1033


Do inline functions improve performance?

1011


When one must use recursion function? Mention what happens when recursion functions are declared inline?

1130


What is the use of bit fields in structure declaration?

921


What is the difference between new() and malloc()?

1914


Write is a binary search tree? Write an algo and tell complexity?

968


What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

1104


Is c++ a software?

1142