Child cObj = new Parent()
Wahts the output ?
Answer Posted / bhavin pandya
It will give yo Error :-
Object reference not set to an instance of an object.
If you want to create object then
Child cObj = new Child()
this is the right way
| Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
explain sub-type and sub class? atleast u have differ it into 4 points?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What is interface in oop?
What is meant by multiple inheritance?
What is abstract class in oop?
What is basic concept of oop?
What is polymorphism what are the different types of polymorphism?
How to use CMutex, CSemaphore in VC++ MFC
What is destructor example?
Why is polymorphism important in oop?
What is oops with example?
Plese get me a perfect C++ program for railway/airway reservation with all details.
Get me a number puzzle game-program
What is abstraction in oop with example?
What is difference between multiple inheritance and multilevel inheritance?