Which of the following type of class allows only one object of it to be created?
ID: 3544706 • Letter: W
Question
Which of the following type of class allows only one object of it to be created?
A. Virtual class
B. Abstract class
C. Singleton class
D. Friend class
Which of the following is not a type of constructor?
A. Copy constructor
B. Friend constructor
C. Default constructor
D. Parameterized constructor
Which of the following statements is correct?
A. Base class pointer cannot point to derived class.
B. Derived class pointer cannot point to base class.
C. Pointer to derived class cannot be created.
D. Pointer to base class cannot be created.
What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?
A. Compile-time error.
B. Preprocessing error.
C. Runtime error.
D. Runtime exception
please help thanks
Explanation / Answer
1. option C: Singleton class
2.option B: Friend constructor
3.option B: Derived class pointer cannot point to base class.
4.option A: Compile-time error.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.