What will be printed out as a result of the following code execution?
#include <stdio.h>

class A { };
class B : public A { };
class C : public B { };

void method(A a) { printf("a"); }
void method(B b) { printf("b"); }

int main() {
  C c;
  method(c);
  return 0;
}

Follow CodeGalaxy

Mobile Beta

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