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
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 # 2
Algorithms can only be implemented using STL containers.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 3
The copy() algorithm returns an iterator to
Choose an answer
the last element copied from
the last element copied to.
the element one past the last element copied from.
the element one past the last element copied to.
Previous
Skip
Next
Question # 4
What a derived class can add?
Choose an answer
New data members
New member functions and New friend functions
New constructors and destructor
All of given
Previous
Skip
Next
Question # 5
When we write a class template the first line must be:
Choose an answer
template < class class_name>
template < class data_type>
templete< class T >
Here T can be replaced with any name but it is preferable
class class-name() class template
Previous
Skip
Next
Question # 6
A generalization-specialization relation between classes are implemented using
Choose an answer
data hiding
friend classes
encapsulation
inheritance
Previous
Skip
Next
Question # 7
We achieve independence of internal implementation from its external interface through-----------
Choose an answer
Encapsulation
Information Hiding
Abstraction
both encapsulation and information hiding
Previous
Skip
Next
Question # 8
this pointer does not point to current object of any class,
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 9
______ is a relationship
Choose an answer
Inheritance
Polymarphism
abstraction
encapsulation
Previous
Skip
Next
Question # 10
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 # 11
Friend functions are _____________ functions of a class.
Choose an answer
None of given
object member
non-member
data member
Previous
Skip
Next
Back