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
How long to learn object oriented programming?
What is for loop and its syntax?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What are two types of polymorphism?
What does no cap mean?
#include
What do you mean by abstraction?
What is oops?what is its use in software engineering?
What is the difference between a mixin and inheritance?
What is destructor oops?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is constructor in oop?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is the purpose of enum?
What type of loop is a for loop?