A |
B |
class Foo
{
int i;
public:
int g()
{return i;}
int f()
{return g()+10;}
};
|
class Foo
{
int i;
public:
int f()
{return g()+10;}
int g()
{return i;}
};
|
Select the correct statement.
I. A and B will be compiled succesfully.
II. A will be compiled but B will cause compilation error as f() calls g() before it is declared.
III. A will cause compilation error as f() calls g() after it is declared.
IV. Both A and B will cause compile error as member functions f() and g() cannot call each other