What is the correct syntax for inheritance?




1) class aclass : public superclass


2) class aclass inherit superclass


3) class aclass <-superclass

Answers were Sorted based on User's Feedback



What is the correct syntax for inheritance? 1) class aclass : public superclass 2)..

Answer / pushpa

class aclass : public superclass

Is This Answer Correct ?    33 Yes 0 No

What is the correct syntax for inheritance? 1) class aclass : public superclass 2)..

Answer / mahreen

1) class aclass : public superclass

Is This Answer Correct ?    6 Yes 2 No

What is the correct syntax for inheritance? 1) class aclass : public superclass 2)..

Answer / srikanth

class aclass inherit superclass

Is This Answer Correct ?    9 Yes 7 No

What is the correct syntax for inheritance? 1) class aclass : public superclass 2)..

Answer / anusha

class aclass <-superclass

Is This Answer Correct ?    4 Yes 3 No

What is the correct syntax for inheritance? 1) class aclass : public superclass 2)..

Answer / uuh

Obviously, it depends on which programming language is
being used.

Is This Answer Correct ?    2 Yes 2 No

What is the correct syntax for inheritance? 1) class aclass : public superclass 2)..

Answer / amit

class aclass:public superclass (in c#,c++)
class aclass inherit superclass(in vb.net)

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More OOPS Interview Questions

why the memory allocated with new cant be freed using free()

2 Answers  


Why is abstraction used?

0 Answers  


what is code for call by value and call by reference?

1 Answers  


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1 Answers  


#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.

0 Answers  


What is an advantage of polymorphism?

0 Answers  


How do you explain polymorphism?

0 Answers  


Explain virtual inheritance?

0 Answers  


what is polymorpsim? what are its types?

8 Answers  


how to find the largest of given numbers in an array

2 Answers  


how to tackle technical questions

1 Answers  


Which is better struts or spring?

0 Answers  


Categories