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 a pointer with example?

0 Answers  


What is the meaning of string in c++?

0 Answers  


When can you tell that a memory leak will occur?

1 Answers  


Explain the difference between overloading and overriding?

0 Answers  


What is the basic structure of a c++ program?

0 Answers  






Which bit wise operator is suitable for turning off a particular bit in a number?

0 Answers  


What is c++ namespace?

0 Answers  


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

0 Answers  


What is scope of a variable? (LOLZ)

2 Answers   CA, TCS,


can anybody please tell me how to write a program in c++,without using semicolon(;)

6 Answers   NIIT,


How much is size of struct having 1 char & 1 integer?

11 Answers   Persistent,


Can you Mention some Application of C/C++?

0 Answers  


Categories