class basex
{
int x;
public:
void setx(int y) {x=y;}
};
class derived : basex {};
What is the access level for the member function "setx" in
the class "derived" above?
a) private
b) local
c) global
d) public
e) protected

Answers were Sorted based on User's Feedback



class basex { int x; public: void setx(int y) {x=y;} }; class derived : basex {}; ..

Answer / guest

private

Is This Answer Correct ?    6 Yes 1 No

class basex { int x; public: void setx(int y) {x=y;} }; class derived : basex {}; ..

Answer / gayatri p

Private

Is This Answer Correct ?    0 Yes 1 No

class basex { int x; public: void setx(int y) {x=y;} }; class derived : basex {}; ..

Answer / madhusudan singh

d) public

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More C++ General Interview Questions

What is the best c++ book?

0 Answers  


what is importance of data sturture in a programming language?

22 Answers   L&T, TCS, Wipro,


Is c++ a good beginners programming language?

0 Answers  


Difference between strdup and strcpy?

0 Answers  


Why are arrays usually processed with for loop?

0 Answers  


why c++ is not called strictly d super set of c?

3 Answers   Satyam,


Describe protected access specifiers?

0 Answers  


When is the destructor called?

0 Answers  


What are stacks? Give an example where they are useful.

0 Answers  


How a modifier is similar to mutator?

0 Answers  


Write about the role of c++ in the tradeoff of safety vs. Usability?

0 Answers  


Should the member functions which are made public in the base class be hidden?

0 Answers  


Categories