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

Is c++ vector a linked list?

0 Answers  


Who calls main function?

0 Answers  


Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.

0 Answers  


What is the disadvantage of using a macro?

0 Answers  


Why do we use vector in c++?

0 Answers  






Explain about templates of C++.

0 Answers  


Write a program to reverse a linked list?

8 Answers   Catalytic Software, Satyam,


What are the differences between a struct in C and in C++?

8 Answers   Amazon, Wipro,


What are the basic data types used in c++?

0 Answers  


Explain stack unwinding.

0 Answers  


Is c++ a pure oop language?

0 Answers  


What is the extension of c++?

0 Answers  


Categories