:: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
Categories >> Software >> Programming Languages >> C++ >> OOPS


Question what is single inheritance?
 Question Asked In Companies :: IBM,     < I also faced this Question! >
 Question Submitted By :: neha khurana
  Answer Posted By  
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 ?    32 Yes 1 No

View All Answers
Please Help Members By Posting Answers For Below Questions
 Question Views   Select
Write a program to reverse a string using recursive function? 632
what are the ways in which a constructors can be called? 456
what is the 3 types of system development life cycle 1006
#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals. 556
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading? 2486
What is interface? When and where is it used? 488
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer 411
Templates mean 437
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence? 982
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash 511
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. 509
what is different between oops and c++ 733
How Do you Code Composition and Aggregation in C++ ? 18554
How to Increment the value of the empid E001 for each and every employee by using the programe? 597
officer say me - i am offered to a smoking , then what can you say 464
E-Mail New Answers        Answer Selected Questions