what is the differance between pass by reference and pass
by value.
Answer Posted / achal ubbott
When we use 'pass by value' method, acopy of the object is
sent to the called function. So the copy constructor of the
object gets called. But the called function cannot modify
the content of the original object.
But references of an object are like alias. When 'pass by
reference ' is used it is actually using address at the
underlying. This way the called function may modify the
contents of the original object since operations are being
performed over the same object using its address, not on
the copy.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
How do you use a 'Local Block'?
How is null defined in c?
how we can make 3d venturing graphics on outer interface
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
Explain what’s a signal? Explain what do I use signals for?
Why is event driven programming or procedural programming, better within specific scenario?
What's the right way to use errno?
What are # preprocessor operator in c?
Can you mix old-style and new-style function syntax?
Can a pointer be static?
What is the benefit of using const for declaring constants?
Write a program with dynamically allocation of variable.
What is #include conio h?
In a switch statement, what will happen if a break statement is omitted?