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

Follow CodeGalaxy

Mobile Beta

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