GCSE · Computer Science · Eduqas · Spec C500QS

Character data type

A ? and a space are both characters, and a 7 held as a character is not a number you can add up. Odd? Let's sort it out.

Computer Science · Data types

One character, or more?

Which data type is the suitable choice for each item? Ask yourself: will it ALWAYS be exactly one character?

Still to sort

Character (char) (0)

Always exactly one character: never two, never none.

Where the line is: The test is 'could it ever be longer than one character?' If the answer is yes, it is not a character job.

String (0)

Could be longer than one character. A sequence of characters of any length.

Where the line is: Even when today's value looks short, data that could be longer needs a string.

8 of 8 still to sort.

Sort each item of data into the type that suits it. Commit first, then read the reason.

Watch out: Short today is not the same as exactly one character, always. If the data could ever be longer, it needs a string.

Computer Science · Data types

What could hold what?

For each value, tick every type that could hold it. Then check.

  • A Could be held as a character
  • B Could be held as a string
  1. a
  2. 7
  3. ?
  4. a single space
  5. hello
  6. abc 123
  7. Hello, World!

Computer Science · Data types

Is a 7 always a number?

A program holds the digit 7 as a character.

Which idea is closest to what you think right now?
How sure are you?

Predict, then check

Commit to a prediction before you see the answer.

A programmer stores a player's name, such as Priya, in a variable meant for the character data type. What is the best prediction?

Computer Science · Data types

Choose it, then justify it

A library app stores two fields: (a) the single letter that names the shelf zone a book sits in (A, B, C or D), and (b) the title of each book. State the most suitable data type for each field and justify each choice. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

One character, or a whole string of them? Learn the one question that decides.

What you need to know

  • A data type defines the kind of data a computer can store and the actions that can be performed on it.
  • The character data type, char for short, holds a single character, like the letter a.
  • That one character may be a letter, a digit, a symbol (like ?) or a space.
  • Have a goYour friend Sam is very confident: 'A character has to be a letter, so a ? can never be one.' Is Sam right?

    No. A ? is a symbol, and a symbol is a perfectly good character.

    A character can be a letter, a digit, a symbol or a space, so it is not limited to letters.

  • A digit held as a character is text, not a number, so it is not used directly in arithmetic.
  • Character is the suitable choice when data is always exactly one character, such as a Y or N reply.
  • Have a goA bus app stores one letter for each route: A, B or C. It is always one letter. Character or string?

    Character.

    Data that is always exactly one character is what the character type is suitable for.

  • Data that can be longer than one character, like a name or a password, needs a string.
  • A string holds text, which can include letters, numbers and symbols, as a sequence of characters of any length.
  • Have a goWhich one needs a string: the symbol # or the word hello?

    The word hello.

    A character holds exactly one character, and hello is five, so it needs a sequence of any length: a string.

  • So the deciding question is: will it always be exactly one character? If it could be longer, use a string.
  • Using an incorrect data type can lead to errors in a program.

The big picture

A data type defines the kind of data a computer can store and the actions that can be performed on it. The character type holds exactly one character (a letter, digit, symbol or space), while a string is a sequence of characters of any length. Ask 'will it always be exactly one character?' to choose, and remember that a digit held as a character is text, not a number.

Key points

1A character holds exactly one character: a letter, a digit, a symbol or a space.
2A digit held as a character is text, so it is not used directly in arithmetic.
3A string is a sequence of characters of any length.
4Choose character only when the data is always exactly one character.
5Using an incorrect data type can lead to errors.

Worked example

Problem

A school app stores two things about each pupil: their middle initial (for example K) and their tutor group (for example 10B). Choose the most suitable data type for each and say why.

⚠ Watch out

Treating the digit inside a character as a number. A 7 held as a character is text, and it is not used directly in arithmetic. A close second is choosing character for anything short. Short is not the test: 'always exactly one character' is.

🧠

Memory hook

Char is one seat. A string is the whole row. If the data might ever need a second seat, it is a string.

✓

Check yourself

Cover the page. A ticket app stores a seat-row letter (always A to F) and a customer's full name. Which type for each, and why?

Flashcards

(10)
What does a data type define?
The kind of data a computer can store and the actions that can be performed on it.
What does the character (char) data type hold?
A single character. Char is short for character.
What can that single character be?
A letter, a digit, a symbol (like ?) or a space.
A 7 is held as a character. Number or text?
Text. A digit held as a character is not used directly in arithmetic.
When is the character type the suitable choice?
When the data is always exactly one character, such as a Y or N reply.
Which type does a name or a password need, and why?
A string, because it can be longer than one character.
What is a string?
Text (letters, numbers and symbols) held as a sequence of characters of any length.
How does a character differ from a string?
A character holds exactly one character. A string is a sequence of characters of any length.
Which question decides between character and string?
'Will it always be exactly one character?' Yes means character. Could be longer means string.
What can happen if you use the wrong data type?
Using an incorrect data type can lead to errors in a program.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.