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
Non Template Friend functions of a class are friends of ________instance/s of that class.
Choose an answer
All
One specific
All instances of one date type
None of the given options
Previous
Skip
Next
Question # 2
Identify the correct way of declaring an object of user defined template class A for char type members?
Choose an answer
A< char > obj;
A obj;
A obj
Obj
A;
Previous
Skip
Next
Question # 3
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 # 4
To convert from a user-defined class to a basic type, you would most likely use
Choose an answer
a built-in conversion operator
a one-argument constructor.
an overloaded = operator.
a conversion operator that’s a member of the class.
Previous
Skip
Next
Question # 5
Which of the following causes run time binding?
Choose an answer
Declaring object of abstract class
Declaring pointer of abstract class
Declaring overridden methods as non-virtual
None of the given
Previous
Skip
Next
Question # 6
A class can be identified from a statement by ------------
Choose an answer
Noun
Pronoun
Verb
Adverb
Previous
Skip
Next
Question # 7
A copy constructor is invoked when
Choose an answer
a function do not returns by value.
an argument is passed by value.
a function returns by reference
an argument is passed by reference
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
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 # 10
Which sentence clearly defines an object?
Choose an answer
one instance of a class
another word for a class.
a class with static methods.
a method that accesses class attributes.
Previous
Skip
Next
Question # 11
If a class D has been derived using protected inheritance from class B (If B is a protected base and D is derived class) then public and protected members of B -------- accessed by member functions and friends of class D and classes derived from D
Choose an answer
can be
cannot be
does restirct to be
does restirct to be
Previous
Skip
Next
Back