Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS304 Quiz, June 2010
#1
Question # 1 of 10 ( Start time: 09:26:23 PM ) Total Marks: 1
Consider the code below, class class1{ public: void func1(); }; class class2 : protected class1 { }; Function func1 of class1 is ______ in class2,
Select correct option:


  • public
  • protected
  • private
  • none of the given options


Question # 2 of 10 ( Start time: 09:27:52 PM ) Total Marks: 1
In case of dynamic memory allocation in a class we should use,
Select correct option:

  • User defined default constructor
  • User defined copy constructor
  • Both of these
  • None of these


Question # 3 of 10 ( Start time: 09:29:20 PM ) Total Marks: 1
Consider the code below, class class1{ protected: int i; }; class class2 : public class1 { }; Then int member i of class1 is ______ in class2,
Select correct option:

  • public
  • protected
  • private
  • none of the given options



Question # 4 of 10 ( Start time: 09:30:13 PM ) Total Marks: 1
In private inheritance derived class pointer can be assigned to base class pointer in,
Select correct option:

  • Main function
  • In derived class member and friend functions
  • In base class member and friend functions
  • None of the given options


Question # 5 of 10 ( Start time: 09:31:42 PM ) Total Marks: 1
Child class can call constructor of its,
Select correct option:

  • Direct base class
  • Indirect base class
  • Both direct and indirect base classes
  • None of these


Question # 6 of 10 ( Start time: 09:31:59 PM ) Total Marks: 1
Consider the following two lines of code written for a class Student, 1. Student sobj1,sobj2; 2. sobj2 = sobj1; In line No.2 what constructor of Student class will be called,
Select correct option:

  • Default constructor of Student class.
  • Copy constructor of student class
  • Both default and copy constructer of Student class
  • No constructor will be called.


Question # 7 of 10 ( Start time: 09:33:17 PM ) Total Marks: 1
Consider the code below, class class1{ public: int i; }; class class2 : public class1 { }; Then int member i of class1 is ______ in class2,
Select correct option:
  • public
  • protected
  • private
  • none of the given options
Question # 8 of 10 ( Start time: 09:33:54 PM ) Total Marks: 1
We can call base class constructor from derived class constructor,
Select correct option:


  • From derived class constructor body
  • From the initializer list of derived class constructor
  • From any member function of derived class
  • We can not call the base class constructor



Question # 9 of 10 ( Start time: 09:35:20 PM ) Total Marks: 1
Adding a derived class to a base class requires fundamental changes to the base class.
Select correct option:
  • True
  • False

Question # 10 of 10 ( Start time: 09:36:44 PM ) Total Marks: 1
Public Inheritance represents,
Select correct option:

  • “IS A” relationship
  • “Has A” relationship
  • “IS Special Kind of” relationship
  • None of these options


Quiz Start Time: 10:18 AM

Question # 1 of 10 ( Start time: 10:18:05 AM ) Total Marks: 1
Virtual functions allow you to
Select correct option:

  • create an array of type pointer-to-base class that can hold pointers to derived classes.
  • create functions that can never be accessed.
  • group objects of different classes so they can all be accessed by the same function code.
  • use the same function call to execute member functions of objects from different classes.


Question # 2 of 10 ( Start time: 10:19:28 AM ) Total Marks: 1
Which one of the following operators is used to access members of value data types,
Select correct option:
  • ->
  • .
  • &
  • None of the given options


Question # 3 of 10 ( Start time: 10:20:54 AM ) Total Marks: 1
Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c2 is,
Select correct option:

  • Direct base class of c3
  • Direct child class of c3
  • Direct base class of c1
  • None of these




Question # 4 of 10 ( Start time: 10:22:09 AM ) Total Marks: 1
Which one of the following operators is used to access members of reference data types,
Select correct option:

  • ->
  • .
  • &
  • None of the given options

Question # 5 of 10 ( Start time: 10:23:19 AM ) Total Marks: 1
In specialization we can,
Select correct option:

  • Replace child class with its base class
  • Replace base class with its child class
  • Replace both child and base classes interchangeably
  • None of the given options

Question # 6 of 10 ( Start time: 10:24:06 AM ) Total Marks: 1
Consider the code below, class class1{ public: void func1(); }; class class2 : private class1 { }; Function func1 of class1 is ______ in class2,
Select correct option:
  • public
  • protected
  • private
  • none of the given options


Question # 7 of 10 ( Start time: 10:25:15 AM ) Total Marks: 1
Function overloading is done with respect of,
Select correct option:

  • A single class
  • A derived class
  • A base class
  • Both derived and base classes (p-203)

Question # 8 of 10 ( Start time: 10:25:44 AM ) Total Marks: 1
Child class can call constructor of its,
Select correct option:
  • Direct base class
  • Indirect base class
  • Both direct and indirect base classes
  • None of these

Question # 9 of 10 ( Start time: 10:26:22 AM ) Total Marks: 1
Consider the code below, class class1{ private: void func1(); }; class class2 : public class1 { }; Function func1 of class1 is ______ in class2,
Select correct option:

  • public
  • protected
  • private
  • none of the given options
Question # 10 of 10 ( Start time: 10:27:26 AM ) Total Marks: 1
Sender of the message does not need to know the exact class of receiver in________.
Select correct option:

  • Abstraction
  • Polymorphism
  • Inheritance
  • none of the given (p-225)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  MTH603 - Numerical Analysis Online Quiz No. 01 vuassignments 1 7,799 05-14-2020, 08:51 PM
Last Post: PatrickTorrens
  MGT201 - Financial Management Quiz No. 1 spring may 2015 Xpert 0 1,744 05-15-2015, 03:43 AM
Last Post: Xpert
  vu announcement for CS504 - Software Engneering Quiz No. 1 spring may 2015 semester Xpert 0 1,567 05-15-2015, 03:37 AM
Last Post: Xpert
  Quiz announcement of Software Engineering 2 Xpert 0 2,359 02-03-2015, 12:43 AM
Last Post: Xpert
  CS101 Introduction To Computing Solved Quiz Spring 2010 Guru 2 6,014 12-15-2014, 08:37 PM
Last Post: Vuhelper
  CS101 Online Quiz No 02 Due date 16th December 2014 Solution & Discussion Entboy 1 2,539 12-15-2014, 08:37 PM
Last Post: Vuhelper
  FIN623 Taxation Management Quiz No. 02 Discussion and Solution Fall 2014 Vuhelper 0 2,100 12-15-2014, 08:27 PM
Last Post: Vuhelper
  ECO403 - Macroeconomics Quiz No. 2 Solution and Discussion Fall 2014 Entboy 0 2,535 12-12-2014, 03:12 PM
Last Post: Entboy
  ACC501 Business Finance Quiz No. 2 Fall 2014 Due Date Dec 12, 2014 education-2014 0 2,248 12-11-2014, 02:43 PM
Last Post: education-2014
  MKT621 Advertising & Promotion Quiz No. 2 Close Date Dec 11, 2014 Vuhelper 0 2,124 12-10-2014, 03:38 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)