class X
{
public:
int x;
static void f(int z);
};
void X::f(int y) {x=y;}
What is the error in the sample code above?
a) The class X does not have any protected members.
b) The static member function f() accesses the non-static z.
c) The static member function f() accesses the non-static x.
d) The member function f() must return a value.
e) The class X does not have any private members.
Answer Posted / guest
option 'c' is the answer
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
How do you save a c++ program?
the maximum length of a character constant can be a) 2 b) 1 c) 8
Who calls main function?
How the delete operator differs from the delete[]operator?
Explain virtual class and friend class.
What are put and get pointers?
What are activex and ole?
What is the purpose of template?
Implement stack operations with pointers with appropriate exception checks.
How do you flush a buffer in c++?
What is the extension of c++?
What is the full form of c++?
What is difference between c++ and c ++ 14?
Is it possible to provide default values while overloading a binary operator?
What is data types c++?