adplus-dvertising
frame-decoration

Question

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.

a.

n

b.

2

c.

√2

d.

Run-time error

Posted under Systems Programming

Answer: (b).2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. 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 ;...