What is the term for spaces added at the beginning of a line of code to improve readability?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Prepare for the OCR GCSE Computer Science Paper 2 exam. Practice with diverse questions, flashcards, and detailed explanations. Boost your confidence and ace your test!

The term that refers specifically to the spaces added at the beginning of a line of code to enhance readability is known as indentation. Indentation is commonly used in programming to signify code structure, such as indicating blocks of code that belong to certain control structures (like loops or conditionals). This practice makes the code easier to read and understand, allowing programmers to visually parse the logical flow of the code at a glance.

Whitespace, although it does include indentation, generally refers to any blank space in the code, including spaces, tabs, and new lines, and is a broader category. Formatting pertains to the overall arrangement and organization of code, which might involve indentation but also includes other aspects such as alignment and style. Spacing typically refers to the physical gaps between characters or lines but does not specifically address the placement of spaces at the start of lines.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy