CS304-Midterm
1 / 50
A static member function cannot be declared
2 / 50
Static variables act like a global variable in the context or scope of the class
3 / 50
When a variable is define as static in a class then all object of this class,
4 / 50
We can use "this" pointer in the constructor in the body and even in the initialization list of any class if we are careful,
5 / 50
Which operator can not be overloaded?
6 / 50
What is true about function templates?
7 / 50
this pointers are not accessible for static member functions
8 / 50
The return type of a constructor is of -------------
9 / 50
Suppose there is an object of type Person, which of the following can be considered as one of its attributes
10 / 50
We capture the object attributes and behavior in Object Oriented programming using---------------
11 / 50
To convert from a user-defined class to a basic type, you would most likely use
12 / 50
The concept of derived classes is involved in,
13 / 50
In object orientated programming, a class of objects cans _____________ properties from another class of objects
14 / 50
15 / 50
If there is a pointer p to objects of a base class, and it contains the address of an object of a derived class, and both classes contain a nonvirtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the _____ class to be executed
16 / 50
What a derived class can add?
17 / 50
The process of hiding unwanted details from users is called __________
18 / 50
A template provides a convenient way to make a family of
19 / 50
20 / 50
Consider the code below, class Fred { public: Fred(); ... }; int main() { Fred a[10]; Fred* p = new Fred[10]; ... } Select the best option,
21 / 50
An overloaded operator always requires one less argument than its number of operands
22 / 50
A generalization-specialization relation between classes are implemented using
23 / 50
Inheritance is a way to
24 / 50
The ________ relationship indicates that an object contains other objects
25 / 50
A member function having the same name as that of a class and a ~ sign with it is called,
26 / 50
A class can be identified from a statement by -------------
27 / 50
The >= operator can be overloaded
28 / 50
29 / 50
Given the following class class Base{ int Age=33; } How you can improve above class with respect to accessing the field Age?
30 / 50
Which of the following is not an example of multiple inheritances?----------
31 / 50
We achieve independence of internal implementation from its external interface through-----------
32 / 50
Which construct is the source for the creation of an object?
33 / 50
Static variable can be initialized more than once.
34 / 50
35 / 50
C++ compiler does not allow to dynamically allocate memory for objects
36 / 50
Which one of the following terms best represents the statement given below, ” Hiding details of an object from the other parts of a program”
37 / 50
Which of the following are an advantage of OOP?
38 / 50
Which of the following operators always takes no argument if overloaded?
39 / 50
Identify which of the following overloaded operator function’s declaration is appropriate for the given call? Rational_number_1 + 2.325 Where Rational_number_1 is an object of user defined class Rational_number
40 / 50
__________ provide the facility to access the data member
41 / 50
For classes with common behavior, you can save effort by placing the common behavior in a __________
42 / 50
In order to free the memory occupied by the object, we use -------------
43 / 50
Static variable can be initialized more than once
44 / 50
Friend class and friend function can be used as an alternate to each other
45 / 50
_______ remain in memory even when all objects of a class have been destroyed
46 / 50
An employee working in an organization has 1.Name 2.Past experience 3.Age 4.Relatives 5.Hobbies in spare times Keeping in view the principle of abstraction, which of the above information the company needs to save as employee’s record?
47 / 50
What problem(s) may occur when we copy objects without using deep copy constructor?
48 / 50
49 / 50
Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete, while classes like Sphere and Cube would normally be abstract
50 / 50
Your score is
The average score is 0%
Restart quiz