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
Зареєструйся Зараз
або Підпишись на майбутні тести