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 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 # 2
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 # 3
Suppose there is an object of type Person, which of the following can be considered as one of its attributes
Choose an answer
Name
Age
Work()
Both Name and Age
Previous
Skip
Next
Question # 4
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 # 5
Which type of inheritance is being represented by the following statement, class X : public A, public B { ... ... };
Choose an answer
Single inheritance
Multiple inheritance
Double inheritance
None of the given options
Previous
Skip
Next
Question # 6
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
Question # 7
What a derived class can add?
Choose an answer
New data members
New member functions and New friend function
New constructors and destructor
All of given
Previous
Skip
Next
Question # 8
A template argument is preceded by the keyword ________.
Choose an answer
vector
class
template
type*
Previous
Skip
Next
Question # 9
Associativity can be changed in operator overloading.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 10
The main function of scope resolution operator (::) is,
Choose an answer
To define an object
To define a data member
To link the definition of an identifier to its declaration
To make a class private
Previous
Skip
Next
Question # 11
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
Back