Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q851: What control statements should a language have, according to the evolution section?
- A: Arithmetic operations
- B: Logical loops and two-way selection
- C: Complex flowcharts
- D: Hardware integration
View Answer
B
Q852: Which language used IF (.NOT. condition) GOTO for selection?
- A: ALGOL 60
- B: Pascal
- C: FORTRAN
- D: Ada
View Answer
C
Q853: In ALGOL 60, what keyword is used to specify a compound statement?
- A: begin
- B: start
- C: open
- D: compound
View Answer
A
Q854: Which rule does Pascal use for nested selectors?
- A: Else goes with the first then
- B: Else goes with the last then
- C: Else goes with the nearest then
- D: Else is not allowed
View Answer
C
Q855: What is an advantage of Ada's "end if" in nested selectors?
- A: Improved flexibility
- B: Enhanced readability
- C: Reduced reliability
- D: Reduced flexibility
View Answer
B
Q856: In C, how is execution flow through multiple selectors controlled?
- A: It is encapsulated
- B: It is restricted
- C: It is unrestricted
- D: It uses default clauses
View Answer
C
Q857: What is the syntax for FORTRAN 77’s counter-controlled loops?
- A: DO variable = start, finish [, stepsize]
- B: FOR variable = start, finish [, stepsize]
- C: LOOP variable = start, finish [, stepsize]
- D: None of the above
View Answer
A
Q858: What happens to the loop variable after a FORTRAN 77 loop?
- A: It becomes undefined
- B: It retains its last value
- C: It is re-initialized
- D: It is removed from memory
View Answer
B
Q859: In Ada, where is the scope of the loop variable?
- A: Global
- B: Local
- C: Loop body
- D: Method-level
View Answer
C
Q860: How does Java's for loop differ from C++?
- A: It allows only Boolean control expressions
- B: It has no initial expression
- C: It skips pretest phase
- D: It allows undefined variables
View Answer
A