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

class Super1 {
  public:
    void Count() { printf("%d", 1); }
};

class Super2 {
  public:
    void Count() { printf("%d", 2); }
};

class Child : public Super1, Super2 { };

int main() {
  Child obj;
  obj.Count();
  return 0;
}
Explanation
It is impossible to determine which function to call, and therefore an error will occur at the compilation stage

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты