Object Oriented Programming Using C++ – Section 6

1. Which of the following are valid characters for a numeric literal constant?

A. a decimal point
B. the letter e
C. a minus sign
D. a plus sign
E. All of the above

Correct Answer:  E. All of the above
Advertisement

2. Any #include files may contain

A. constants
B. variables
C. functions
D. All of the above

Correct Answer:  D. All of the above
Advertisement

3. When a break statement is used in a loop, the control skips the rest of the statements in the loop after it and jumps

A. to the last lines in the program
B. to the next statement written after the body of the loop
C. to the first statement in the body of the loop
D. All. of the above
E. None of the above

Correct Answer:  B. to the next statement written after the body of the loop
Advertisement

4. The function that takes arguments to set the bits of count is _____

A. setf()
B. bitsef()
C. ios()
D. flag()

Correct Answer:  A. setf()
Advertisement

5. When two types are used in a function template and one is labeled T, the other

A. must also be named T
B. must be named U
C. can be any legal C++ identifier
D. it is illegal to have two types

Correct Answer:  A. must also be named T
Advertisement

Leave A Comment?