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.
Answers were Sorted based on User's Feedback
Answer / d289
The error is in x not being referenced/initialized properly.
Is This Answer Correct ? | 1 Yes | 4 No |
What is c++ best used for?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
What is == in programming?
What is microsoft c++ redistributable?
What is the arrow operator in c++?
Consider the following code fragment: int main(void) { int m = 4; mystery ( m ); mystery ( m ); printf("%d", m); return 0; } What is the output on the monitor if mystery is defined as follows ? void mystery (int m) { m = m+3; }
What is #include math h in c++?
what Is DCS ? what i will get benefit when i did?
Disadvantages of c++
Are there any special rules about inlining?
CAN U SAY WHICH PROGRAMING LANGUAGE IS USED BY DOCTORS....?
what is scupper?