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
Which of the following is an integral part of an object?
Choose an answer
State
Behavior
Unique identity
All of the given
Previous
Skip
Next
Question # 2
Assume a class Derv that is privately derived from class Base. An object of class Derv located in main() can access
Choose an answer
public members of Derv.
protected members of Derv.
private members of Derv
protected members of Base.
Previous
Skip
Next
Question # 3
In order to define a class template, the first line of definition must be:
Choose an answer
template
typename <template T>
Template Class
Class <Template T>
Previous
Skip
Next
Question # 4
The ________ relationship indicates that an object contains other objects.
Choose an answer
None of given
has-a’
is-a’
be
Previous
Skip
Next
Question # 5
The user must define the operation of the copy constructor.
Choose an answer
True
False
Not Sure
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
Assume a class C with objects obj1, obj2, and obj3. For the statement obj3 = obj1 - obj2 to work correctly, if the overloaded - operator must
Choose an answer
take two arguments
return a value
create a named temporary object.
take four arguments
Previous
Skip
Next
Question # 8
Friend functions are _____________ functions of a class.
Choose an answer
None of given
object member
non-member
data member
Previous
Skip
Next
Question # 9
A normal C++ operator that acts in special ways on newly defined data types is said to be
Choose an answer
glorified
encapsulated
classified
overloaded
Previous
Skip
Next
Question # 10
An abstract class is useful when,
Choose an answer
We do not derive any class from it.
There are multiple paths from one derived class to another
We do not want to instantiate its object.
You want to defer the declaration of the class
Previous
Skip
Next
Question # 11
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
Back