what is single inheritance?

Answers were Sorted based on User's Feedback



what is single inheritance?..

Answer / dev

When a derived class has only one base class its called a
single inheritance

Is This Answer Correct ?    106 Yes 7 No

what is single inheritance?..

Answer / jasbir singh

when a single class is being inherited by a class, it is
called single or simple inheritance.

example:

class a
{
public:
int x,y;
};
class b: public a //// example of simple inhieritence
{
public:
int z;
}

Is This Answer Correct ?    91 Yes 19 No

what is single inheritance?..

Answer / ranjit kumar nayak

inheritance is single bcoz it sharing the property between
two classes.one is called parent another is child.

Is This Answer Correct ?    75 Yes 21 No

what is single inheritance?..

Answer / karthikse09

one class derived from base class is called inheritance

Is This Answer Correct ?    51 Yes 10 No

what is single inheritance?..

Answer / anjana

SINGLE INHERITANCE:
ONE BASE CLASS HAVING ONE DERIVED CLASS MEANS THAT IS CALLED SINGLE INHERITANCE.
EXAMPLE:
[A]------->BASE CLASS
|
V
[B]------->DERIVED CLASS

Is This Answer Correct ?    39 Yes 4 No

what is single inheritance?..

Answer / sathish

Inheritance : The Base Class information passed onto
derived class.

Single Inheritance : The Derived class having only one Base
class is called single Inheritance.

Multiple Inheritance : The Derived class having more than
one base class is called Multiple Inheritance.

Is This Answer Correct ?    33 Yes 1 No

what is single inheritance?..

Answer / mosin

only one base class with derived to only one derived class

Is This Answer Correct ?    33 Yes 11 No

what is single inheritance?..

Answer / tanu agarwal

single inheritance is defined as the one in which derived
class inherits only one base class .

Is This Answer Correct ?    21 Yes 5 No

what is single inheritance?..

Answer / kanna

Only One parent per Derived class.it mean one base class having one derived class is single inheritance.


The derived classes may have a number of direct base classes,is multiple inheritance.

Is This Answer Correct ?    14 Yes 3 No

what is single inheritance?..

Answer / sabari

Deriving only one class from base class is called single inheritance.
For example:
#include<iostream.h>
#include<conio.h>
class student
{
public:
int rno;
char na[30];
void input();
};
void student::input()
{
cout<<"enter the student name";
cin>>na;
cout<<"enter the register no:";
cin>>rno;
}
class mark:public student //derivation
{
int m1,m2,m3;
float t,av;
public:
void display()
{
cout<<"Enter m1,m2,m3 values\n"
cin>>m1>>m2>>m3;
t=m1+m2+m3;
av=t/3;
cout<<endl<<"name="<<na;
cout<<endl<<"Register number="<<rno;
cout<<endl<<"total="<<t;
cout<<endl<<"average="<<av;
}
};
void main()
{
clrscr();
mark ob;
ob.input();
ob.display();
getch();
}

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More OOPS Interview Questions

In multilevel inheritance constructors will be executed from the .... class to ... class

2 Answers   ABCO, TCS,


What are the OOPS concepts?

106 Answers   A1 Technology, Bajaj, CTS, EDS, HP, Infosys, Intel, Microsoft, MNC, Persistent, PlanetSoft, ProConstructor, TCS, Virtusa, Wipro, YSoft Solutions,


any one please tell me the purpose of operator overloading

0 Answers   Amazon,


What does no cap mean?

0 Answers  


Which language is not a true object oriented programming language?

0 Answers  






What is the difference between an object and a class?

3 Answers  


The expansion of GNU

3 Answers  


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

0 Answers  


what is difference between objects and function

3 Answers  


What is class and example?

0 Answers  


What is public, protected, private?

6 Answers   IBS, Satyam,


What causes polymorphism?

0 Answers  


Categories