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 cout flush?

0 Answers  


What is size of Empty Class?

3 Answers   Persistent,


What is the use of 'this' pointer?

0 Answers   Fidelity,


How much do c++ programmers make?

0 Answers  


Give an example of run-time polymorphism/virtual functions.

0 Answers  






What is class invariant in c++?

0 Answers  


Explain the scope resolution operator?

2 Answers  


Is java based off c++?

0 Answers  


what is the diff b/n c and c++ a. dynamic scoping b. nested switching c. declaration of variables in any code block d. separation of compilation and linking

2 Answers   Hughes,


How can you differentiate between inheritance and implementation in c++?

0 Answers  


What does std mean in c++?

0 Answers  


What is a character in c++?

0 Answers  


Categories