Hard
A global that reads another file's global
Given these two translation units linked into one program, what can be said about the output when the program runs?
a.cpp / b.cpp
// --- b.h ---
struct B {
static int value;
};
// --- b.cpp ---
#include "b.h"
int B::value = 42;
// --- a.cpp ---
#include <iostream>
#include "b.h"
struct A {
A() { std::cout << "A sees B::value = " << B::value << std::endl; }
};
A globalA; // a non-local static object with dynamic initialization
// --- main.cpp ---
int main() {}32 of 117 in C++