Random question, please help asap

1. Which of the following is the constructor name of class Computer?
a. ComputerConstructor
b. Computer
c. ConstructorComputer
d. Constructor


I am totally not sure what this is even asking. Help me out please?
Constructors do not have names.
A special declarator syntax is used to declare or define the constructor. The syntax uses:
— an optional <elided>
— the constructor’s class name, and
— a parameter list
in that order - IS


1
2
3
4
5
struct Computer
{
     Computer( /* ... */ ) ; // constructor (declaration)
     // ...
};
So the constructor name is simply Computer in this case?
Computer is the name of the class. Constructors do not have names.

Bad question:
1
2
3
4
5
1. Which of the following is the constructor name of class Computer?
    a.	ComputerConstructor
    b.	Computer
    c.	ConstructorComputer
    d.	Constructor

Answer (if it must be answered): None of the above. Constructors do not have names.
Topic archived. No new replies allowed.