Compiler-Design
December 30, 2023
Question 14275 – Verbal
December 31, 2023
Compiler-Design
December 30, 2023
Question 14275 – Verbal
December 31, 2023

Programming

Question 7

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;

A
10
B
-20
C
-10
D
None
Question 7 Explanation: 
X is remains unchanged. As the if condition is becomes false.
X = -10
Correct Answer: C
Question 7 Explanation: 
X is remains unchanged. As the if condition is becomes false.
X = -10
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!!