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
The specialization pattern
after the name says that this specialization is to be used for every,
Choose an answer
data type
meta type
virtual type
pointer type
Previous
Skip
Next
Question # 2
Which of the following is the best approach if it is required to have more than one functions having exactly same functionality and implemented on different data types?
Choose an answer
Templates
Overloading
Data hiding
Encapsulation
Previous
Skip
Next
Question # 3
The life of sub object is not dependant on the life of master class in ___________
Choose an answer
Composition
Aggregation
Separation
None of the given
Previous
Skip
Next
Question # 4
this pointers are not accessible for static member functions
Choose an answer
true
false
not sure
Previous
Skip
Next
Question # 5
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 # 6
Which of the following are an advantage of OOP?
Choose an answer
OOP makes it easy to re-use the code
It provides an ability to create one user defined data type by extending the other
It provides the facility of defining Abstract data types through which real world entities can be defined better
All of the given options
Previous
Skip
Next
Question # 7
In order to free the memory occupied by the object, we use -------------
Choose an answer
Constructor
Destructor
Shallow Copy
Deep Copy
Previous
Skip
Next
Question # 8
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 # 9
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 # 10
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 # 11
The type that is used to declare a reference or pointer is called its ---------
Choose an answer
default type
static type
abstract type
reference type
Previous
Skip
Next
Back