GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 185 of 203    Print  
Using Inheritance
Using inheritance, which of the following is not allowed
a) Changing implementation of operation in parent by the subclass
b) Using implementation of operation in parent class by the subclass
c) Using attributes in parent class by the subclass
d) Having operations is subclass which do not exist in parent class
e) None



  
Total Answers and Comments: 2 Last Update: October 04, 2009     Asked by: aman_17it 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 23, 2008 09:02:55   #1  
Bhoomika sharma Member Since: December 2008   Contribution: 40    

RE: Using Inheritance
Yes you cannot change the implementation of ny methods in the base class by the sub classes thus the answer is (a)

Thus in inheritance you cannot change the methods but you can use them always.

 
Is this answer useful? Yes | No
October 04, 2009 03:21:11   #2  
vijay.badola Member Since: August 2008   Contribution: 2    

RE: Using Inheritance
We can override the implementation of parent class but we cannot change implementation from child class. So 'A' is not correct.
 
Is this answer useful? Yes | No

 Related Questions

Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments 
Latest Answer : hi,Inheritance is the process of creating a new class called derived class from the existing class called base class. ...

Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching 
Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ...

Latest Answer : As long as no diamond problems (improper inheritance),  single or multiple inheritance can all be proper inheritance. When usng multiple inheritance with diamond problem, you can use virtual inheritance to make the multiple inheritance a proper one. ...
Read Answers (3) | Asked by : tanish

what is inheritance? why we use it? plzz can anybody explain me with one example and where we use that concept? 
Latest Answer : The main use of inheritance is to provide reusability of codes .Through inheritance base class objects and functions are acquired by derived class so there is no need to specify it again in derived class ...

What is the danger of using public unsigned integers within a class?In a diamond-shaped inheritance hierarchy, how to ensure that only 1 copy of parent is created? 
Latest Answer : There are at least 2 questions here. The latter is answered but not the former.If the initial question is answered, there would be a requirement to highlight what the dangers are for both public unsigned and multiple inheritance. ...

Hi I very recently did the C++ online Quiz and was surprised to find that my answer (1) to the following question (below) was incorrect. Is there something I am missing here, or is the answer incorrect. 
Latest Answer : You can if the base class provides public or protected methods that modify its private data.  Then derived class can expose this using access specifiers. ...

Using inheritance, which of the following is not alloweda) Changing implementation of operation in parent by the subclassb) Using implementation of operation in parent class by the subclassc) Using attributes 
Latest Answer : We can override the implementation of parent class but we cannot change implementation from child class. So 'A' is not correct. ...

Which one of the following statements regarding C++ class inheritance is FALSE? a. Inheritance promotes generic design and code reuse.b. Struct cannot be inherited in C++. c. C++ supports multiple 
Latest Answer : The only difference between a class and a struct is a class has private access and private inheritance by default and a struct has public access and public inheritance by default. The only place I'm aware of that you can't replace class with struct is ...


 Sponsored Links

 
Related Articles

Microsoft AJAX Library - Inheritance using Prototypes

Inheritance using Prototypes Once again prototyping can help us implement an OOP feature in a more elegant way than when using closures Prototype based inheritance makes use of the behavior of JavaScript prototypes When accessing a member of a function that member will be looked for in the function
 

Microsoft AJAX Library - Inheritance using Closures

Inheritance using Closures and Prototypes There are two significant techniques for implementing the OOP concept of inheritance with JavaScript code The first technique uses closures and the other technique makes use of a feature of the language named prototyping Early implementations of the Microsof
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ Inheritance

C Inheritance Introduction What is Inheritance Inheritance is the process by which new classes called derived classes are created from existing classes called base classes The derived classes have all the features of the base class and the programmer can choose to add new features specific to the ne
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape