...
Question 3608 – 2005 Dec UGC NET Paper-1
February 13, 2024
Question 10250 – Programming
February 13, 2024
Question 3608 – 2005 Dec UGC NET Paper-1
February 13, 2024
Question 10250 – Programming
February 13, 2024

Question 10213 – Programming

What is the value of X printed by the following program?

 program COMPUTE (input, output);
    var
                  X:integer;
    procedure FIND (X:real);
                  begin
                  X:=sqrt(X);
                  end;
   begin
                  X:=2
                  Find(X)
                  Writeln(X)
   end 

Correct Answer: C

Question 6 Explanation: 
Since nothing is said in question. So we will assume by default call by value.
X in the procedure FIND is a local variable. No change will be reflected in global variable X.
A
2
B
√2
C
Run time error
D
None of the above
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!