What is the difference between pass by reference and pass by
value?
Answer Posted / manila
Pass By Value:
1.It passes the actual value of parameter from the function
call.
2.Value of the parameter variable in calling functions
remains unchanged.
3.copy of the variable of actual parameter are made and
transfer to the formal parameter.
call By Reference:
1.the address of the actual parameter has to be transfered
2.the formal parameter in the function decleretion must of
pointer type.
3.Any changes in the formal parameter can change the value
of actual patameter.
| Is This Answer Correct ? | 30 Yes | 11 No |
Post New Answer View All Answers
What do you mean by Encapsulation?
What is the fundamental idea of oop?
What is overriding in oop?
What is super in oop?
What polymorphism means?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What are the two different types of polymorphism?
class type to basic type conversion
Explain virtual inheritance?
What are the three main types of variables?
What is an advantage of polymorphism?
When not to use object oriented programming?
Why multiple inheritance is not allowed?
How can you overcome the diamond problem in inheritance?
What is oops with example?