Having the following class declaration with functions, choose the lines, which have mistakes:
class A {
  void Test() const; // 1
};
void A::Test() const; // 2
void A::Test() const {} // 3

void Test() const; // 4
void Test() const {}  // 5
Explanation
Line // 2 - Declaration of a class-member function is prohibited outside the class declaration.
Lines // 4 and // 5 - normal functions can't have const modifier.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes