Computer Programming Exam
Q&A 2026.
1. ___________ are used to translate each source code instruction into the
appropriate machine language instruction. - ANSCompilers
10. In a C++ program, two slash marks (//) indicate: - ANSthe beginning of a
comment
11. Of the following, which is a valid C++ identifier?
A) June1997
B) _employee_number
C) ___department
D) myExtraLongVariableName
E) All of the above are valid identifiers - ANSE) All of the above are valid identifiers
12. The numeric data types in C++ can be broken into two general categories:
A) numbers and characters
B) singles and doubles
C) integer and floating point
D) real and unreal - ANSC. Integer and floating point
13. A character literal is enclosed in ________ quotation marks, whereas a string
literal is enclosed in _______ quotation marks.
A) Double, Single
B) Triple, double
C) open, closed
D) single, double
E) None of the above - ANSD) single, double
14.___________ must be included in any program that uses the cout object. -
ANSThe header file iostream
15. What is the value of cookies after the execution of the following statements?
int number = 38, children = 4, cookies;
cookies = number o/o children; - ANSA) 2
16. The float data type is considered _______ precision, and the double data type is
considered _________ precision.
A) single, double
1 | P a g e