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
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 # 2
In object orientated programming, a class of objects cans _____________ properties from another class of objects
Choose an answer
Utilize
Borrow
Inherit
Adopt
Previous
Skip
Next
Question # 3
Virtual functions allow you to
Choose an answer
create an array of type pointer-to-base class that can hold pointers to derived classes.
create functions that can never be accessed.
group objects of different classes so they can all be accessed by the same function code
use the same function call to execute member functions of objects from different classes (Object-Oriented Programming in C++)
Previous
Skip
Next
Question # 4
------------- members are somewhere between public and private members. They are used in inheritance
Choose an answer
protected
public
private
global
Previous
Skip
Next
Question # 5
___________, which means if A declares B as its friend it does NOT mean that A can access private data of B. It only means that B can access all data of A.
Choose an answer
Friendship is one way only
Friendship is two way only
NO Friendship between classes
Any kind of friendship
Previous
Skip
Next
Question # 6
Associativity can be changed in operator overloading.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 7
A template argument is preceded by the keyword ________.
Choose an answer
vector
class
template
type*
Previous
Skip
Next
Question # 8
Template functions use _________ than ordinary functions.
Choose an answer
Greater Memory
Lesser Memory
Equal Memory
None of the given options
Previous
Skip
Next
Question # 9
Encapsulation means
Choose an answer
Extending the behaviour of class in another class
Data and behaviour are tightly coupled within an entity
One entity takes all the attributes and operations of the other
Taking out the common features and put those in a separate class
Previous
Skip
Next
Question # 10
The statement objA=objB; will cause a compiler error if the objects are of different classes.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 11
this pointers are not accessible for static member functions.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Back