Can we have a private constructor ?

Answer Posted / prabha govind

yes
and if a constructor is made private/protected...then that
class cannot be inherited

Is This Answer Correct ?    116 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a varargs method be overloaded?

618


What is inheritance in oop?

604


What is abstraction in oops?

591


program for insertion ,deletion,sorting in double link list

2283


What is the difference between static polymorphism and dynamic polymorphism?

587






What are benefits of oop?

639


What is inheritance in simple words?

627


How Do you Code Composition and Aggregation in C++ ?

24205


What is inheritance write a program to show use of inheritance?

615


Advantage and disadvantage of routing in telecom sector

790


What is the full form of oops?

612


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

1654


Why is abstraction used?

612


What is a null tree?

632


to find out the minimum of two integer number of two different classes using friend function

1645