Programming | Cambridge IGCSE Computer Science (0478)
Guide overview All 10 topics Sample questions Papers and weighting Look inside Questions and answers
Programming
- 107 questions
- 6 subtopics
- Paper 2
Programming is examined in Paper 2 (Algorithms, Programming and Logic).
It covers variables, constants and data types; sequence, selection and iteration; totalling, counting and string handling; procedures, functions and library routines; arrays; and file handling.
Sample questions from Programming
Answer each one closed book first, then open the answer.
-
Variables, constants and data types
What is a variable?
Show the answer
A variable is a named memory location whose value can change while the program runs. -
Variables, constants and data types
What is the difference between a char and a string?
Show the answer
A char is a single character. A string is a sequence of zero or more characters. -
Sequence, selection and iteration
What is sequence?
Show the answer
Sequence is carrying out instructions one after another in the order they are written. -
Sequence, selection and iteration
Give an example of nested iteration.
Show the answer
A FOR loop over the rows of a table can contain a second FOR loop over the columns, so every cell is visited. -
Totalling, counting and string handling
What does the LENGTH function return?
Show the answer
The LENGTH function returns the number of characters in a string, so LENGTH("Happy Days") returns 10. -
Totalling, counting and string handling
Why are UCASE or LCASE useful when checking an answer?
Show the answer
Converting the input to one case means answers such as Yes, YES and yes are all accepted. -
Procedures, functions and library routines
What is a procedure?
Show the answer
A procedure is a named block of code that performs a task and can be called from anywhere in the program. -
Procedures, functions and library routines
How can MOD be used to test whether a number is even?
Show the answer
A number is even if MOD(Number, 2) returns 0.
The 6 subtopics
One subtopic is one session. Work down the list.
| Subtopic | What it covers | Questions |
|---|---|---|
| Variables, constants and data types | Declaring variables and constants, the five basic data types and input and output in pseudocode. | 17 |
| Sequence, selection and iteration | IF and CASE statements, count-controlled, pre-condition and post-condition loops, and nested statements. | 30 |
| Totalling, counting and string handling | Running totals and counters, and the LENGTH, SUBSTRING, UCASE and LCASE functions. | 8 |
| Procedures, functions and library routines | Procedures, functions, parameters, local and global variables, MOD, DIV, ROUND and RANDOM, and maintainable code. | 25 |
| Arrays | Declaring and using one-dimensional and two-dimensional arrays, with loops that read and write every element. | 15 |
| File handling | Why programs store data in files, and opening, reading, writing and closing files in pseudocode. | 12 |
How the guide is worked
Answering a question from memory stores it far better than reading the answer again. The guide runs that as a fixed procedure on one subtopic at a time, about twenty minutes a session.
-
Step 1 · Closed book
Cover the answers. Work through one subtopic and write down what you can. Leave blanks where you have nothing.
-
Step 2 · Open book
Go back to the top. Read each printed answer and write it out in full, including the ones you had right.
-
Step 3 · Closed book again
Same questions, same order, from memory. The gap between pass one and pass three is the session result.
Read the full method, the return schedule and the research behind it.
Around this topic
Cambridge IGCSE Computer Science Active Recall Guide
Programming and every other topic, with the answers printed after each section.