More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
CS-304 Final Term Exams Preparation Virtual University MCQs With Answers
Question # 1
Suppose we have two derived classes from a single class, can we write a method with same name in both these derived classes? Choose the best option.
Choose an answer
No
Only if the two classes have the same name
Only if the main program does not declare both kinds
Yes
Previous
Skip
Next
Question # 2
A class can be identified from a statement by ------------
Choose an answer
Noun
Pronoun
Verb
Adverb
Previous
Skip
Next
Question # 3
Friend class and friend function can be used as an alternate to each other
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 4
What problem(s) may occur when we copy objects without using deep copy constructor?
Choose an answer
Dangling pointe
Memory Leakage
All of the given
System crash
Previous
Skip
Next
Question # 5
When a subclass specifies an alternative definition for an attribute or method of its superclass, it is _______ the definition in the superclass.
Choose an answer
overload
overriding
copy riding
none of given
Previous
Skip
Next
Question # 6
Considering the resolution order in which Considering the resolution order in which compiler search for functions in a program; the first priority is given to; the first priority is given to,
Choose an answer
general template
partial specialization
complete specialization
ordinary function
Previous
Skip
Next
Question # 7
Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete, while classes like Sphere and Cube would normally be abstract.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 8
Which is not the Advantage of inheritance?
Choose an answer
providing class growth through natural selection.
facilitating class libraries
avoiding the rewriting of code.
providing a useful conceptual framework.
Previous
Skip
Next
Question # 9
C++ compiler does not allow to dynamically allocate memory for object
Choose an answer
False
True
Not sure
Previous
Skip
Next
Question # 10
Encapsulation means
Choose an answer
Extending the behaviour of class in another class
Data and behaviour are tightly coupled within an entity
One entity takes all the attributes and operations of the other
Taking out the common features and put those in a separate class
Previous
Skip
Next
Question # 11
Static variable can be initialized more than once.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Back