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
What is the fastest c++ compiler?
Which one between if-else and switch is more efficient?
What is auto type c++?
What is problem with overriding functions?
What are the various situations where a copy constructor is invoked?
Why cout is used in c++?
What are member functions used in c++?
What is object file? How can you access object file?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
What is virtual table?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Which is not a valid keyword a) public b) protected c) guarded
Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].
What is c++ used for in games?
What is a forward referencing and when should it be used?