In the following procedure Integer procedure P(X, Y); Integer X,Y: value x;…

ISRO Scientist/Engineer SC 2020

In the following procedure

Integer procedure P(X, Y);
Integer X,Y:
value x;
begin
  K = 5;
  L = 8;
  P = x + y;
end 

X is called by value and Y is called by name. If the procedure were invoked by the following program fragment

K = 0;
  L = 0;
  Z = P(K, L); 

then the value Z would be set equal to

  1. A.

    5

  2. B.

    8

  3. C.

    13

  4. D.

    0

Attempted by 330 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…