Question 3608 – 2005 Dec UGC NET Paper-1
February 13, 2024Question 10250 – Programming
February 13, 2024Question 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.
X in the procedure FIND is a local variable. No change will be reflected in global variable X.
2
√2
Run time error
None of the above
Subscribe
Login
0 Comments