7 years ago in C++ Classes And Objects

For a method to be an interface between the outside world and a class,it has to be declared ?

[A] private
[B] protected
[C] public
[D] external
Next Question

Overall Stats

Attempted 142
Correct 35
Incorrect 22
Viewed 85


haile feleke - 4 years ago

why not private?

Elijah Rodriguez
Elijah Rodriguez - 1 month ago

Elijah Rodriguez is saying private is correct answer

sunita thakur
sunita thakur - 1 month ago

sunita thakur is saying public is correct answer

Saurabh Singh
Saurabh Singh - 2 months ago

Saurabh Singh is saying private is correct answer

Shubham Kumar
Shubham Kumar - 3 months ago

Shubham Kumar is saying protected is correct answer

Related Questions

A class cannot be ?

  • [A] Virtual
  • [B] Generic
  • [C] Inline
  • [D] Friend

In C++, a function contained within the class is called ?

  • [A] member function
  • [B] a class function
  • [C] a method
  • [D] none of above

Objects of the same class share the values of ...... while they maintain separate values for ........ .

  • [A] Static variables, non static variables
  • [B] Non static variables, static variables
  • [C] Global variables, static variables
  • [D] Static variables, register variables

Which member function of class cannot modify its objects attributes ?

  • [A] friend functions
  • [B] Private member functions
  • [C] Constant member functions
  • [D] Static member functions