What the program will print:

const char* const S = "Hello World";
#include <iostream>

extern const char* const S;

int main() {
    std::cout << S << std::endl;
    return 0;
According to the "3.5 Program and linkage" of standard S it will have an internal linkage and is only available in the s.cpp:
A name having namespace scope (3.5.3) has internal linkage if it is the name of
— an object or reference that is explicitly declared const and neither explicitly declared extern nor previously declared to have external linkage

Mobile Beta

Get it on Google Play
or Subscribe for future quizzes