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
Consider the following statement Cupboard has books What is the relationship between Cupboard and books?
Choose an answer
Composition
Aggregation
Inheritance
None of the given options
Previous
Skip
Next
Question # 2
Using encapsulation we can achieve
Choose an answer
Information hiding
Least interdependencies among modules
Implementation independence
All of given options
Previous
Skip
Next
Question # 3
Which part of an object exhibits its state?
Choose an answer
Data
Operations
Any public part
Any private part
Previous
Skip
Next
Question # 4
The specialization pattern
after the name says that this specialization is to be used for every,
Choose an answer
data type
meta type
virtual type
pointer type
Previous
Skip
Next
Question # 5
Which of the following operators can not be overloaded?
Choose an answer
Scope resolution operator ( :: )
Insertion operator ( << )
Extraction operator ( >> )
The relation operator ( > )
Previous
Skip
Next
Question # 6
Which operator can not be overloaded?
Choose an answer
The relation operator ( >= )
Assignment operator ( = )
Script operator ( [] )
Conditional operator (? : )
Previous
Skip
Next
Question # 7
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 # 8
----------------- follow try block to catch the object thrown
Choose an answer
catch block
throw block
main block
non of the given
Previous
Skip
Next
Question # 9
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 # 10
Non Template Friend functions of a class are friends of ________instance/s of
Choose an answer
All
One specific
All instances of one date type
None of the given options
Previous
Skip
Next
Back