Hard
Upcasting to the second base under multiple inheritance
What does this program print?
main.cpp
#include <iostream>
struct A { int a = 1; };
struct B { int b = 2; };
struct C : A, B { int c = 3; };
int main() {
C obj;
C* pc = &obj;
B* pb = pc; // implicit upcast
void* rawA = static_cast<void*>(pc);
void* rawB = static_cast<void*>(pb);
std::cout << (rawA == rawB) << std::endl;
}58 of 117 in C++