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
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 # 2
Consider a class named Vehicle, which of the following can be the instance of class Vehicle? 1. Car 2. Computer 3. Desk 4. Ahmed 5. Bicycle
Choose an answer
1, 4, 5
2, 5, 6
1, 2, 3, 6
1, 5, 6
Previous
Skip
Next
Question # 3
Suppose we have two derived classes from a single class, can we write a method with same name in both these derived classes? Choose the best option.
Choose an answer
No
Only if the two classes have the same name
Only if the main program does not declare both kinds
Yes
Previous
Skip
Next
Question # 4
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 # 5
C++ compiler does not allow to dynamically allocate memory for object
Choose an answer
False
True
Not sure
Previous
Skip
Next
Question # 6
Which one of the following terms must relate to polymorphism?
Choose an answer
Static allocation
Static typing
Dynamic binding
Dynamic allocation
Previous
Skip
Next
Question # 7
For classes with common behavior, you can save effort by placing the common behavior in a __________.
Choose an answer
Derived Class
Base class
Deprived Class
Named class
Previous
Skip
Next
Question # 8
________ and ______ methods may not be declared abstract.
Choose an answer
private,static
private,public
static,public
None of the given
Previous
Skip
Next
Question # 9
A C++ class is similar to --------------------
Choose an answer
Structure
Header File
Library File
None of the given
Previous
Skip
Next
Question # 10
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 # 11
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
Back