Object Oriented Programming Using C++ - Section 8 Multiple Questions and Answers.




26.The function printDataMembers() is mot likely a(n) ________
A. inspector functions
B. mutator functions
C. auxiliary functions
D. manager functions

27.The code class Descendant : virtual public Ancestor indicates that
A. the members of Ancestor will be included more than once in Descendant
B. the members of Ancestor will be included only once in Descendant
C. the members of Descendant will be included more than once in Ancestor
D. the members of Descendant will be included only once in Ancestor

28.Inheritance is the principle that
A. Classes with the same name must be derived from one another
B. Knowledge of a general category can be applied to more specific objects
C. C++ functions may be used only if they have logical predecessors
D. One function name may invoke different methods

29.Which of the following formulas can be used to generate random integers between 1 and 10?
A. 1 + rand() % (10 - 1 + 1)
B. 1 + (10 - 1 + 1) % rand()
C. 10 + rand() % (10 - 1 + 1)
D. 10 + rand() % (10 + 1)

30.Format flags may be combined using the _____
A. bitwise OR operator(|)
B. logical OR operator (||)
C. bitwise AND operator (&)
D. logical AND operator (&&)

«»



Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers