Object Oriented Programming Using C++ – Section 7

1. The comma operator (,) is primarily used in conjunction with

A. ‘for’ statement
B. ‘if-else’ statement
C. ‘do-while’ statement
D. All of the above
E. None of the above

Correct Answer:  A. ‘for’ statement

2. To execute a C++ program, you first need to translate the source code into object code. This process is called

A. coding
B. compiling
C. sourcing
D. translating

Correct Answer:  B. compiling

3. The rules of a programming language are called its _____

A. code
B. guidelines
C. procedures
D. regulations
E. syntax

Correct Answer:  E. syntax

4. An array element is accessed using

A. a first-in-first-out approach
B. the dot operator
C. a member name
D. an index number

Correct Answer:  D. an index number

5. The program can access the private members of a class

A. directly
B. only through other private members of the class
C. only through other public members of the class
D. None of the above – the program cannot access the private members of a class in any way

Correct Answer:  C. only through other public members of the class

Leave A Comment?

17 − three =