Computer Science I / Structured Program Design
Practice question · Multiple choice

Structured programming allows only sequence, selection and iteration, and it was proved that these three suffice for any computable function. Why did anyone need to prove that, and what was being given up?

Hints
  1. In a program full of gotos, how do you work out how control reached a given line?
  2. Ask what the proof needed to rule out before goto could be abandoned.
Show the answer

D. Because the alternative was goto, and removing it costs no expressive power.

Why

Böhm–Jacopini mattered because it removed the obvious objection: programmers could reasonably ask whether dropping goto made some programs unwriteable, and the theorem answered no. What is given up is arbitrary jumps, and that is the point, control enters a block at the top and leaves at the bottom, so a block can be understood alone. The argument was about human reasoning, not machine behaviour.

Read the lesson: Structured Program Design →

Practise Structured Program Design

The app has 7 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Structured Program Design