What is the value of X printed by the following program? program COMPUTE…
GATE · 1995 · CS · Question 2 subpartsModified — slightly modified from the official paper; see the solution
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.
2
- B.
√2
- C.
Run time error
- D.
None of the above
Attempted by 24 students.
Sign up free to check your answer
Sign up freeLoading lesson…