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 does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

0 Answers  


What is a literal in c++?

0 Answers  


Can inline functions have a recursion? Give the reason?

3 Answers  


What is guard code in c++?

0 Answers  


Can a program run without main?

0 Answers  






what is importance of data sturture in a programming language?

22 Answers   L&T, TCS, Wipro,


what is the size of this class class size { public: char data1; double d; int data2; char data3; double data4; short data5; }; please explain the padding for these double variables.

9 Answers  


Why do we use using namespace std in c++?

0 Answers  


What does the ios::ate argument do?

0 Answers  


can output 5 students using one dimensional array

1 Answers   Intel,


Can a constructor be private?

0 Answers  


Write a Program for find and replace a character in a string.

0 Answers  


Categories