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
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 # 2
Algorithms can only be implemented using STL containers.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 3
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 # 4
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 # 5
Which part of an object exhibits its state?
Choose an answer
Data
Operations
Any public part
Any private part
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
An STL container can not be used to
Choose an answer
hold objects of class employee.
store elements in a way that makes them quickly accessible
compile c++ programs.
organize the way objects are stored in memory
Previous
Skip
Next
Question # 8
Given the following class class Base{ int Age=33; } How you can improve above class with respect to accessing the field Age?
Choose an answer
Define the variable Age as private
Define the variable Age as protected
Define the variable Age as private and create a get method that returns it and a set method that updates it
Define the variable Age as protected and create a set method that returns it and a get method that updates it
Previous
Skip
Next
Question # 9
this pointers are not accessible for static member functions.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 10
_______ “is a” relationship
Choose an answer
Inheritance
Polymarphism
abstraction
encapsulation
Previous
Skip
Next
Question # 11
When is a constructor called?
Choose an answer
Each time the constructor identifier is used in a program statement
During the instantiation of a new object
During the construction of a new class
At the beginning of any program execution
Previous
Skip
Next
Back