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:

What is the correct JavaScript syntax to write "Hello World"?
Which of the following is used as a language for designing web pages ?
Pick out OOP language from the following :
Which of the following is not a correct C++ comment ?