You are on page 1of 2

MCM Nkana Secondary School

2020 Grade 11 C++ Test

Name: Chilungu Nakazwe Total Marks: 25

1. (a) (i) What is a variable?


………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………… [2]
(ii) Using C++, declare a variable called age whose datatype is integer
………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………… [2]
(b) List two C++ reserved words
………………………………………………………………………………………………………………… [1]
………………………………………………………………………………………………………………… [1]
(c) Outline three rules for naming variables in C++
………………………………………………………………………………………………………………… [1]
………………………………………………………………………………………………………………… [1]
………………………………………………………………………………………………………………… [1]
2. Write the structure of a C++ program

[5]

Copyright © $. Phiri
3. What do the following symbols and or notations signify in C++?

(a) { ………………………………………………………………………………………………………….. [1]

(b) = ………………………………………………………………………………………………………….. [1]

(c) == ………………………………………………………………………………………………………… [1]

(d) / …………………………………………………………………………………………………………… [1]

(e) && ……………………………………………………………………………………………………….. [1]

(f) || ………………………………………………………………………………………………………….. [1]

(g) // ………………………………………………………………………………………………………….. [1]

(h) } …………………………………………………………………………………………………………... [1]

(i) != …………………………………………………………………………………………………………. [1]

4. What is the meaning of debugging?


………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………. [2]

Copyright © $. Phiri

You might also like