Open In App
Related Articles

UGC-NET | UGC NET CS 2014 Dec – III | Question 19

Improve Article
Improve
Save Article
Save
Like Article
Like

Consider the following statements S1, S2 and S3 :
S1 : In call-by-value, anything that is passed into a function call is unchanged in the caller’s scope when the function returns.
S2 : In call-by-reference, a function receives implicit reference to a variable used as argument.
S3 : In call-by-reference, caller is unable to see the modified variable used as argument.
(A) S3 and S2 are true.
(B) S3 and S1 are true.
(C) S2 and S1 are true.
(D) S1, S2, S3 are true.


Answer: (C)

Explanation:

  • In call-by-value, anything that is passed into a function call is unchanged in the caller’s scope when the function returns. Correct.
  • In call-by-reference, a function receives implicit reference to a variable used as argument. Correct.
  • In call-by-reference, caller is unable to see the modified variable used as argument. Incorrect.
  • So, option (C) is correct.

    Quiz of this Question

    Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

    Last Updated : 03 Jul, 2018
    Like Article
    Save Article
    Previous
    Next
    Similar Reads