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
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
Question # 2
Default constructor is such constructor which either has no ---------or if it has some parameters these have ----- --- values
Choose an answer
Parameter, temporary
Null, Parameter
Parameter, default
None of the given
Previous
Skip
Next
Question # 3
Multiple inheritance can be of type
Choose an answer
Public
Private
Protected
All of the given
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
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 # 6
Suppose you create an uninitialized vector as follows: vector
evec; After adding the statment, evec.push_back(21); what will happen?
Choose an answer
The following statement will add an element to the start (the back) of evec and will initialize it with the value 21
The following statement will add an element to the center of evec and will reinitialize it with the value 21
The following statement will delete an element to the end (the back) of evec and will reinitialize it with the value 21
The following statement will add an element to the end (the back) of evec and initialize it with the value 21.
Previous
Skip
Next
Question # 7
In ________, a base class can be replaced by its derived class,
Choose an answer
Sub-typing
Super-typing
Multiple-typing
Restricted-typing
Previous
Skip
Next
Question # 8
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 # 9
Which of the following is not an example of multiple inheritances?----------
Choose an answer
Mermaid
Woman
None of the given
Amphibious Vehicle
Previous
Skip
Next
Question # 10
Two important STL associative containers are _______ and _______.
Choose an answer
set,map
sequence,mapping
setmet,multipule
sit,mat
Previous
Skip
Next
Question # 11
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
Back