Object Oriented Programming Using C++ – Section 5

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;

Correct Answer:  A. int numltems = 0;

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)

Correct Answer:  D. setiosflags(ios::fixed)

38. The #include instruction is called a

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

Correct Answer:  B. directive

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

Correct Answer:  A. must be of the same type as return type of the function

40. Classes hold _____

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

Correct Answer:  C. both data and methods

Warning: Undefined variable $in_same_cat in /www/wwwroot/mtexam.com/public_html/wp-content/plugins/EXP.GKFEED.COM/function.php on line 27

Warning: Undefined variable $excluded_categories in /www/wwwroot/mtexam.com/public_html/wp-content/plugins/EXP.GKFEED.COM/function.php on line 27

Leave A Comment?