Compiler-Design
December 30, 2023Aptitude
December 31, 2023Programming
|
Question 11
|
In the following Pascal program segment, what is the value of X after the execution of the program segment?
X:=-10; Y:=20;
If X > Y then if X < 0 then X:=abs(X) else X:=2*X;
|
10
|
|
|
-20
|
|
|
-10
|
|
|
None
|
Question 11 Explanation:
X is remains unchanged. As the if condition is becomes false.
X = -10
X = -10
Correct Answer: C
Question 11 Explanation:
X is remains unchanged. As the if condition is becomes false.
X = -10
X = -10
