CS-304 Final Term Exams Preparation Virtual University With Answers

CS-304 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 A template provides a convenient way to make a family of variables and data members functions and classes classes and exceptions programs and algorithms
2 When the base class and the derived class have a member function with the same name, you must be more specific which function you want to call (using ___________). scope resolution operator dot operator null operator Operator overloading
3 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 non of the given
4 Which of the following may not be an integral part of an object? State Behaviour Protected data members All of given
5 __________, which means if A declares B as its friend it does NOT mean that A can access private data of B. It only means that B can access all data of A. Friendship is one way only Friendship is two way only NO Friendship between classes Any kind of friendship
6 An STL container can not be used to, hold objects of class employee. store elements in a way that makes them quickly accessible compile c++ programs organize the way objects are stored in memory
7 Encapsulation means 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
8 The sub-object’s life is not dependant on the life of master class in __________. Separation Composition Aggregation
9 How the information hidden within an object can be accessed? Through its interface Through its private data members Through its private member functions Through both public and private members
10 The type that is used to declare a reference or pointer is called its ------- default type static type abstract type reference type
Download This Set

Is this page helpful?