Will the following code compile:
struct A {
};

struct B : A {
};

int main() {
  B b;
  A a = dynamic_cast<A>(b);
}

Follow CodeGalaxy

Mobile Beta

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