Object Oriented Programming Using C++ – Section 11

21. Which of the following control structures is used in every program?

A. repetition
B. selection
C. sequence
D. switching

Correct Answer:  C. sequence

22. In the C language, a string is assigned to the

A. char type of variable
B. string type of variable
C. conversion specification %s
D. All of the above

Correct Answer:  A. char type of variable

23. Which of the following statements declares a one-dimensional Character array named item that consists of five elements?

A. char item[0 to 4] = “”;
B. char item[0 to 5] = “”;
C. char item[4] = “”;
D. char item[5] = “”;
E. string item[5] = ‘ ‘;

Correct Answer:  D. char item[5] = “”;

24. A derived class may also be called a

A. subclass
B. super class
C. parent class
D. derived class

Correct Answer:  A. subclass

25. The main() function is always

A. a called function
B. a calling function
C. recursive function
D. used at the end of the program
E. None of the above

Correct Answer:  B. a calling function

Leave A Comment?

three + three =