Computer Science - Object Oriented Programming Using C++

36. 

Which of the following declares and initializes an Integer variable named numltems?

A. int numltems = 0;
B. int numltems = '0';
C. integer numltems = 0;
D. numltems int = 0;
E. numltems integer = 0;

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

37. 

Which of the following tells C++ to display numbers in fixed notation?

A. setiosflags(fixed)
B. setiosflags(fixed: :is)
C. setiosflags(ios, fixed)
D. setiosflags(ios::fixed)

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

38. 

The #include instruction is called a

A. direction
B. directive
C. merge instruction
D. statement.

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

39. 

Another drawback to returning an error code from a function is that any error code returned by the function

A. must be of the same type as return type of the function
B. must not be a character
C. cannot be checked in a main() program
D. can have multiple meanings

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

40. 

Classes hold _____

A. data
B. methods
C. both data and methods
D. neither data nor methods

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.