CS-304 Final Term Exams Preparation Virtual University With Answers

image
image
image

CS-304 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 What is true about function templates? 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 None of the given.
2 Which one of the following terms must relate to polymorphism? Static allocation Static typing Dynamic binding Dynamic allocation
3 Which one is not keyword in C++? operator B_op const None of given
4 The life of sub object is not dependant on the life of master class in ___________ Composition Aggregation Separation None of the given
5 Given the following class class Base{ int Age=33; } How you can improve above class with respect to accessing the field Age? 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
6 this pointers are not accessible for static member functions true false not sure
7 Which construct is the source for the creation of an object? Destructor of the class New operator Delete operator Constructor of the class
8 The concept of derived classes is involved in, inheritance encapsulation array structure
9 What a derived class can add? New data members New member functions and New friend function New constructors and destructor All of given
10 Keeping in view the principle of abstraction, which of the above information the company needs to save as employee’s record? 2, 4 1, 3, 5 1, 2, 3 1, 2, 3, 4
Download This Set