Given the following programming constructs: i) assignment ii) for loops where…

GATE · 1999 · CS · Question 2 subparts

Given the following programming constructs:

i) assignment

ii) for loops where the loop parameter cannot be changed within the loop

iii) if-then-else

iv) forward goto

v) arbitrary goto

vi) non-recursive procedure call

vii) recursive procedure/function call

viii) repeat loop

Which constructs should not be included in a programming language so that it is possible to program the terminates (i.e., halting) function in the same programming language?

  1. A.

    (ii), (iii), (iv)

  2. B.

    (v), (vii), (viii)

  3. C.

    (vi), (vii), (viii)

  4. D.

    (iii), (v), (viii)

Attempted by 30 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…