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
Like template functions, a class template may not handle all the types successfully.
Choose an answer
True
True
Not Sure
Previous
Skip
Next
Question # 2
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 # 3
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 # 4
How the information hidden within an object can be accessed?
Choose an answer
Through its interface
Through its private data members
Through its private member functions
Through both public and private members
Previous
Skip
Next
Question # 5
In a de-queue, (chose the best option)
Choose an answer
data can be quickly inserted or deleted at any arbitrary location.
data can be inserted or deleted at any arbitrary location, but the process is relatively slow. (Object-Oriented Programming in C++)
data can not be quickly inserted or deleted at either end
data can be inserted or deleted at either end, but the process is relatively slow.
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
The members of a class that can be accessed without creating the object of the class is called
Choose an answer
Private member
Data Member
Public Member
Static
Previous
Skip
Next
Question # 8
Which part of an object exhibits its state?
Choose an answer
Data
Operations
Any public part
Any private part
Previous
Skip
Next
Question # 9
In case of multiple inheritance a derived class inherits,
Choose an answer
Only the public member functions of its base classes
Only the public data members of its base classes
Both public data members and member functions of all its base classes
Data members and member functions of any two base classes
Previous
Skip
Next
Question # 10
When a virtual function is called by referencing a specific object by name and using the dot member selection operator (e.g., squareObject.draw()), the reference is resolved at compile time.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 11
A template argument is preceded by the keyword ________.
Choose an answer
vector
class
template
type*
Previous
Skip
Next
Back