Question 10553 – Programming
February 13, 2024Question 9944 – Programming
February 13, 2024Programming
|
Question 28
|
Given the programming constructs (i) assignment (ii) for loops where the loop parameter cannot be changed within the loop (iii) if-then-else (iv) forward go to (v) arbitrary go to (vi) non-recursive procedure call (vii) recursive procedure/function call (viii) repeat loop, which constructs will you not include in a programming language such that it should be possible to program the terminates (i.e., halting) function in the same programming language.
|
(ii), (iii), (iv)
|
|
|
(v), (vii), (viii)
|
|
|
(vi), (vii), (viii)
|
|
|
(iii), (vii), (viii)
|
Question 28 Explanation:
Arbitrary goto, recursive call and repeat loop may enter infinite loop and the program might never terminate.
Correct Answer: B
Question 28 Explanation:
Arbitrary goto, recursive call and repeat loop may enter infinite loop and the program might never terminate.
