C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 3)
3.
Which of the following statements is correct?
Discussion:
41 comments Page 2 of 5.
Wele Suda said:
1 decade ago
@Deepak.
Take NO, C++ is OO language, so it has bottom-up approach, not top-bottom.
Take NO, C++ is OO language, so it has bottom-up approach, not top-bottom.
Priya said:
1 decade ago
Derived class is the class already inherited from base class. So, there is no need for derived class to point the base class. As I thought so.
Prashant said:
1 decade ago
Then what is up casting?
Sandep said:
1 decade ago
There points and all the doubts will be cleared.
1) in top-down approach will can't do up casting where as reverse is possible.
2) As derived class has inherited there is no need for pointing to the base class object.
3) In top-down approach the derived class does not no about the base class do pointing to the base class is not possible using the pointer of derived class.
1) in top-down approach will can't do up casting where as reverse is possible.
2) As derived class has inherited there is no need for pointing to the base class object.
3) In top-down approach the derived class does not no about the base class do pointing to the base class is not possible using the pointer of derived class.
Divya said:
1 decade ago
Why D is not correct? Is we create pointer for base class?
Thazaar said:
10 years ago
It is a top down approach. So derived class pointer cannot point to the base class.
Kazi Ameen said:
10 years ago
It is just because of the top-down approach.
Mahejbin said:
10 years ago
Extending the base class by name so the derived class know which data we are using maybe derived class point to the base class.
Ari said:
8 years ago
Yes, you are Right @Nayan.
Down Casting is way to point base class by derived class pointer.
Down Casting is way to point base class by derived class pointer.
Priya modak said:
8 years ago
I agree because it is a top-down approach.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers