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 of these are examples of error handling techniques?
Choose an answer
Abnormal Termination
Graceful Termination
Return the illegal
all of the given
Previous
Skip
Next
Question # 2
Inheritance is a way to
Choose an answer
organize data.
add features to existing classes without rewriting them
improve data-hiding and encapsulation.
Previous
Skip
Next
Question # 3
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 # 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
We can use "this" pointer in the constructor in the body and even in the initialization list of any class if we are careful
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 6
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 # 7
Graphical representation of the classes and objects is called object model it shows -------
Choose an answer
Class Name only
Class Name and attributes
Relationships of the objects and classes
all of the given
Previous
Skip
Next
Question # 8
One purpose of an iterator in the STL is to connect algorithms and containers.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 9
Like template functions, a class template may not handle all the types successfully.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 10
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 # 11
________ is/are used to access information hidden within an object?
Choose an answer
Interface
Private data members
Private member functions
Both public and private members
Previous
Skip
Next
Back