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
_______ “is a” relationship
Choose an answer
Inheritance
Polymarphism
abstraction
encapsulation
Previous
Skip
Next
Question # 2
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 # 3
Like template functions, a class template may not handle all the types successfully.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 4
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 # 5
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 # 6
Non Template Friend functions of a class are friends of ________instance/s of that class.
Choose an answer
All
One specific
All instances of one date type
None of the given options
Previous
Skip
Next
Question # 7
Each try block can have ______ no. of catch blocks.
Choose an answer
1
2
3
As many as necessary
Previous
Skip
Next
Question # 8
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
non of the given
Previous
Skip
Next
Question # 9
Public methods of base class can --------- be accessed in its derived class
Choose an answer
directly
inderectly
simultaniously
none of the given
Previous
Skip
Next
Question # 10
When a subclass specifies an alternative definition for an attribute or method of its superclass, it is _______ the definition in the superclass.
Choose an answer
overload
overriding
copy riding
none of given
Previous
Skip
Next
Question # 11
The find() algorithm
Choose an answer
finds matching sequences of elements in two containers
finds a container that matches a specified container
takes iterators as its first two arguments. (Object-Oriented Programming in C
takes container elements as its first two arguments.
Previous
Skip
Next
Back