Early programs jumped around freely with goto statements and became impossible to follow. Structured programming fixed this, and C was designed as a structured language. This section explains both ideas and gives an accurate history of C.
Structured programming
In the 1960s many programs used unrestricted goto (“jump to line 240”), producing tangled control flow nicknamed spaghetti code. In 1968 Edsger Dijkstra published the letter “Go To Statement Considered Harmful”, and the structured programming approach became standard.
Structured programming combines ideas from earlier sections: the three control structures (the Böhm and Jacopini theorem in the Flowcharts section) and top-down design.
Advantages
Disadvantages
Easier to read, test and debug
Occasionally slightly less efficient
Modules can be reused
Some unusual control flows are awkward to express
Teams can work on separate modules
Easier to maintain
C still includes a goto statement (Unit 3), but structured C code rarely needs it.
History of C
1960ALGOL 60, international committee
→
1963CPL, Cambridge and London
→
1967BCPL, Martin Richards
→
1969B, Ken Thompson, Bell Labs
→
1972C, Dennis Ritchie, Bell Labs
→
1978K&R book
→
1989/90ANSI C89 / ISO C90
→
1999–2024C99, C11, C17, C23
From ALGOL to modern C
C was developed by Dennis Ritchie at AT&T Bell Laboratories in 1972, mainly so that the UNIX operating system could be written in a high-level language. It was first implemented on a DEC PDP-11.
C took ideas from B (Ken Thompson), which was itself derived from BCPL (Martin Richards), a simplified form of CPL.
In 1978 Brian Kernighan and Dennis Ritchie published The C Programming Language. The version of C it described, called K&R C, became the de facto standard.
An ANSI committee (X3J11) was formed in 1983. Its standard was completed in 1989 (C89) and adopted by ISO in 1990 (C90). Later standards are C99, C11, C17 and C23.
Key takeaways
Structured programming uses sequence, selection and iteration, single-entry single-exit blocks, and top-down modules.
Dijkstra’s 1968 letter started the move away from goto-based code.
C: Dennis Ritchie, Bell Labs, 1972, developed from B and BCPL, to write UNIX.
K&R C (1978) was the first de facto standard; ANSI C89 / ISO C90 was the first official one.
Practice questions
Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 6 · short answer
Give two reasons why structured programming is preferred to goto-based programming, and name its three control structures.
Show worked answer
First, structured code reads from top to bottom, and each block has one entry and one exit, so the flow can be followed and checked without tracing jumps; this makes debugging easier. Second, the program is divided into modules (functions), which can be tested separately, reused and shared among team members, making maintenance easier. The three control structures are sequence, selection and iteration.
MCA Online notes are made for reading on screen. Open https://mcastudy.online/mcs-201/programming-fundamentals/structured-programming-and-the-history-of-c/ to read this page.