ProgrammingIntroduction

The Storage Boxes

Part of Variables & ConstantsGCSE Computer Science

This introduction covers The Storage Boxes within Variables & Constants for GCSE Computer Science. Revise Variables & Constants in Programming for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This topic appears less often, but it can still be a useful differentiator on mixed-topic papers. It is section 2 of 6 in this topic. Use this introduction to connect the idea to the wider topic before moving on to questions and flashcards.

Topic position

Section 2 of 6

Practice

15 questions

Recall

10 flashcards

The Storage Boxes

Think of computer memory as a warehouse full of boxes. A variable is a labelled box where you can store data - and change what's inside whenever you want. The label (name) stays the same, but contents can change: "score = 10" then later "score = 15". A constant is a sealed box - once you put something in, it can never change. Use constants for things like PI = 3.14159 or VAT_RATE = 0.20.

Keep building this topic

Read this section alongside the surrounding pages in Variables & Constants. That gives you the full topic sequence instead of a single isolated revision point.

Practice Questions for Variables & Constants

Which of the following best describes a variable in a program?

  • A. A named memory location whose value can be changed during execution
  • B. A named memory location whose value cannot be changed once set
  • C. A value that is hard-coded directly into the program instructions
  • D. A fixed mathematical value such as pi or the speed of light
1 markfoundation

Explain three reasons why using named constants is considered good programming practice.

3 marksstandard

Quick Recall Flashcards

What is a constant?
Named storage location whose value cannot change
What is a variable?
Named storage location whose value can change

Want to test your knowledge?

PrepWise has 15 exam-style questions and 10 flashcards for Variables & Constants — with adaptive difficulty and instant feedback.

Join Alpha