The following code is given:
class A { };
class B : public A { };
class C : public B { };
class D : public C { };

void method(B* b) { }
void method(C* c) { }

int main() {
  ...
  return 0;
}
Which code snippets inserted instead of the ellipsis in the main method, will not, cause a compilation error?

Follow CodeGalaxy

Mobile Beta

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