Data Types & Program Design is one of 10 topics in the Grade 12 Information Technology CAPS syllabus, covered across 3 lessons on Study Vault. Below are real practice questions from this topic with full worked answers.
Sample practice questions
Easy
1. Which data type stores whole numbers with no fractional or decimal component?
Integer
Real (floating-point)
Boolean
String
Answer: Integer — The integer data type stores whole numbers, with no fractional or decimal component, such as a count of students.
Easy
2. Which data type stores only one of exactly two possible values, true or false?
Boolean
Integer
Real (floating-point)
Character
Answer: Boolean — The Boolean data type stores only true or false, representing the outcome of a condition or a simple yes/no state.
Medium
3. A program needs to store a student's average mark calculated to two decimal places, such as 74,5. Which data type is most appropriate?
Real (floating-point)
Integer
Boolean
Character
Answer: Real (floating-point) — A value with a fractional/decimal component, like an average calculated to two decimal places, requires the real (floating-point) data type; using an integer would incorrectly truncate or round it.