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
Can we have inheritance without polymorphism?
Write a program to reverse a string using recursive function?
Why do we use polymorphism in oops?
Can enum be null?
Why is destructor used?
What are functions in oop?
What is the use of oops?
What is overriding in oop?
What is methods in oop?
What do you mean by overloading?
What is multilevel inheritance in oop?
What is the full form of oops?
officer say me - i am offered to a smoking , then what can you say
write a program that takes input in digits and display the result in words from 1 to 1000
what is the sylabus for priliminaries?