Challenger App

No.1 PSC Learning App

1M+ Downloads
Which access specifier is used for constructors in C++?

Aprivate

Bpublic

Cprotected

Dall the above

Answer:

B. public

Read Explanation:

  • The public keyword is used to create public members (data and functions).
  • The public members are accessible from any part of the program.

Related Questions:

In programming, what is the purpose of a loop?
Which of the following Languages is used for Artificial Intelligence?
Full Form for EBCDIC:
Which of the following does not belongs to the group ?
What is the correct way to declare a variable in JavaScript ?