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
______ is a relationship
Choose an answer
Inheritance
Polymarphism
abstraction
encapsulation
Previous
Skip
Next
Question # 2
Like template functions, a class template may not handle all the types successfully.
Choose an answer
True
True
Not Sure
Previous
Skip
Next
Question # 3
What is true about function templates?
Choose an answer
The compiler generates only one copy of the function template
The compiler generates a copy of function respective to each type of data
The compiler can only generate copy for the int type data
non of the given
Previous
Skip
Next
Question # 4
this pointers are not accessible for static member functions.
Choose an answer
True
False
Not Sure
Previous
Skip
Next
Question # 5
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 # 6
Which of the following causes run time binding?
Choose an answer
Declaring object of abstract class
Declaring pointer of abstract class
Declaring overridden methods as non-virtual
None of the given
Previous
Skip
Next
Question # 7
A template provides a convenient way to make a family of
Choose an answer
variables and data members
functions and classes
classes and exceptions
programs and algorithms
Previous
Skip
Next
Question # 8
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 # 9
What problem(s) may occur when we copy objects without using deep copy constructor?
Choose an answer
Dangling pointe
Memory Leakage
All of the given
System crash
Previous
Skip
Next
Question # 10
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 # 11
In ________, a base class can be replaced by its derived class,
Choose an answer
Sub-typing
Super-typing
Multiple-typing
Restricted-typing
Previous
Skip
Next
Back