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
Compiler performs ________ type checking to diagnose type errors,
Choose an answer
Static
Dynamic
Bound
Unbound
Previous
Skip
Next
Question # 2
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 # 3
A class template may inherit from another class template.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 4
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 # 5
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 # 6
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 # 7
When the base class and the derived class have a member function with the same name, you must be more specific which function you want to call (using ___________).
Choose an answer
scope resolution operator
dot operator
null operator
Operator overloading
Previous
Skip
Next
Question # 8
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 # 9
The concept of derived classes is involved in,
Choose an answer
inheritance
encapsulation
array
structure
Previous
Skip
Next
Question # 10
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 # 11
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
Back