Computer Programming Exam Q&A 2026., Exams of Computer Science

Computer Programming Exam Q&A 2026.

Typology: Exams

2025/2026

Available from 06/30/2026

zipporah-wanjiru
zipporah-wanjiru 🇺🇸

1.2K documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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
pf3

Partial preview of the text

Download Computer Programming Exam Q&A 2026. and more Exams Computer Science in PDF only on Docsity!

Computer Programming Exam

Q&A 2026.

  1. ___________ are used to translate each source code instruction into the appropriate machine language instruction. - ANSCompilers
  2. In a C++ program, two slash marks (//) indicate: - ANSthe beginning of a comment
  3. Of the following, which is a valid C++ identifier? A) June B) _employee_number C) ___department D) myExtraLongVariableName E) All of the above are valid identifiers - ANSE) All of the above are valid identifiers
  4. 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
  5. 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
  6. 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
  7. The float data type is considered _______ precision, and the double data type is considered _________ precision. A) single, double

B) float, double C) integer, double D) short, long E) None of the above - ANSA) single, double

  1. A variable whose value can be either true or false of this data type. - ANSA) Boolean
  2. What will the value of x be after the following statements execute? int x; x= 18 o/o 4; - ANS
  3. What statement best describes a variable and its primary purpose? A) A variable is a structured, general purpose language designed primarily for teaching programming B) A variable is a collection of eight bits. C) A variable is a named storage location in the computer's memory use for holding a piece of information D) A variable is a word that has a special meaning to the compiler E) A variable is a "line" of code in the body of a program, which may change - ANSA variable is a named storage location in the computer's
  4. A variable declaration announces the name of a variable that will be used in a program as well as: - ANSThe type of data it will be used to hold
  5. This step will uncover any syntax errors in your program. - ANSCompiling
  6. The statements written by the programmers are called: - ANSSource Code
  7. Three primary activities of a program are: - ANSInput, Processing and Output
  8. This is a set of rules that must be followed when constructing a program. - ANSSyntax
  9. Which of the following is a preprocessor Directive? A) pay= hours * rate B) cin >> rate; C) // This program calculates the user's pay. D) int main () E) #Include - ANSE) #Include
  10. Which of the following is not one of the five major components of a computer system? A) Preprocessor B) The CPU (Central Processing Unit) C) Main Memory D) Input/Output device E) Secondary Storage (RAM) - ANSA) Preprocessor In the following C++ statement, what will be executed first according to the order of precedence result= 6-3*2 + 7 - 10 / 2; A) 6-