Question Set

1. If a base class contains a member function func(), and a derived class does not contain a function with this name, an object of the derived class cannot access func().



Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.04 pm
    It depends upon how the function func() has been defined in the base class. If the function func() is defined public in base class then an object of the derived class can access the function func().
Show Similar Question And Answers
QA->Average height of 10 students in a class is 150 cm. A boy of height 160 cm left the class and a boy of height 148 cm is admitted. Then what is the average height of the students in the class now?....
QA->If function inside another function is called a _____ Function....
QA->In Kiran’s opinion, his weight is greater than 65 kg but less than 72 kg. His brother does not agree with Kiran and he thinks that Kiran’s weight is greater than 60 kg but less than 70 kg. His mother’s view is that his weight cannot be greater than 68 kg. If all are them are correct in their estimation, what is the average of different probable weights of Kiran?....
QA->There are 50 students in a class. In a class test 22 students get 25 marks each, 18 students get 30 marks each. Each of the remaining gets 16 marks. The average mark of the whole class is :....
QA->There are two divisions A and B of a class, consisting of 36 and 44 students respectively. If the average weight of divisions A is 40 kg and that of division b is 35 kg. What is the average weight of the whole class?....
MCQ->If a base class contains a member function func(), and a derived class does not contain a function with this name, an object of the derived class cannot access func().....
MCQ->Which of the following statements are correct about Inheritance in C#.NET? A derived class object contains all the base class data. Inheritance cannot suppress the base class functionality. A derived class may not be able to access all the base class data. Inheritance cannot extend the base class functionality. In inheritance chain construction of object happens from base towards derived.....
MCQ->What will be the output of the following program? #include<iostream.h> class Base { int x, y; public: Base() { x = y = 0; } Base(int xx) { x = xx; } Base(int p, int q = 10) { x = p + q; y = q; } void Display(void) { cout<< x << " " << y << endl; } }objDefault(1, 1); class Derived: public Base { Base obj; public: Derived(int xx, int yy): Base(xx, xx + 1) { } Derived(Base objB = objDefault) { } }; int main() { Derived objD(5, 3); Derived ptrD = new Derived(objD); ptrD->Display(); delete ptrD; return 0; }....
MCQ->Which of the following statements is correct about the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class Sample { public int func() { return 1; } public Single func() { return 2.4f ; } } class Program { static void Main(string[ ] args) { Sample s1 = new Sample(); int i; i = s1.func(); Single j; j = s1.func(); } } }....
MCQ->The way a derived class member function can access base class public members, the base class member functions can access public member functions of derived class.....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution