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
What is abstract class in oop?
State what is encapsulation and friend function?
What is the diamond problem in inheritance?
What is encapsulation in oop?
can inline function declare in private part of class?
What is abstract class in oops?
What is the types of inheritance?
What are two types of polymorphism?
Why is polymorphism needed?
What are oops methods?
What is polymorphism in oops?
What are the 4 main oop principles?
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
What is class and example?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.