Can we create object of class with private constructor?
Answer Posted / rahul dhangar
class Rahul
{
private:
int a,b,c;
Rahul()
{ cout<<"enter the no";
cin>>a>>b;
c=a+b;
cout<<c;
}
};
void main()
{
Rahul();
getch();
}
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
what type of questions
What are constructors in oop?
What is the highest level of cohesion?
What do you mean by Encapsulation?
What is interface in oop?
What is static in oop?
officer say me - i am offered to a smoking , then what can you say
how to get the oracle certification? send me the answer
What causes polymorphism?
How is polymorphism achieved?
Write a program to reverse a string using recursive function?
What is difference between oop and pop?
Where is pseudocode used?
What is an advantage of polymorphism?
What is a class in oop?