CS-304 Final Term Exams Preparation Virtual University With Answers

CS-304 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 Default constructor is such constructor which either has no ---------or if it has some parameters these have -------- values Parameter, temporary Null, Parameter Parameter, default non of the given
2 dentify the correct way of declaring an object of user defined template class A for char type members? A&lt; char &gt; obj; &lt; char &gt; A obj<char>;</char> Obj &lt; char &gt;<char> A;</char>
3 Consider the following statement Cupboard has books What is the relationship between Cupboard and books? Composition Aggregation Inheritance None of the given options
4 In Private -------------- only member functions and friend classes or functions of a derived class can convert pointer or reference of derived object to that of parent object specialization inheritance abstraction composition
5 If a class D has been derived using protected inheritance from class B (If B is a protected base and D is derived class) then public and protected members of B -------- accessed by member functions and friends of class D and classes derived from D can be cannot be does restirct to be does restirct to be
6 The statement objA=objB; will cause a compiler error if the objects are of different classes. True False Not Sure
7 __________, 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
8 Which sentence clearly defines an object? one instance of a class another word for a class. a class with static methods. a method that accesses class attributes.
9 Consider the following statement Cupboard has books What is the relationship between Cupboard and books? Composition Aggregation Inheritance None of the given options
10 Which of the following is an integral part of an object? State Behavior Unique identity All of the given
Download This Set

Is this page helpful?