Quiz: Building Larger Programs
Test your understanding with these technical questions.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
You have a header file logger.hpp containing the declaration void logError(const char* msg);. You include this header in both main.cpp and network.cpp. What happens during the build process?
A.
The compiler generates an error because logError is declared twice.
B.
The linker generates an error because logError is defined twice.
C.
The build succeeds (assuming logError is defined in exactly one .cpp file).
D.
The preprocessor ignores the second inclusion automatically without guards.
1 / 6
...