Advanced C++
Q75 / 100

What are C++20 modules and how do they differ from header files?

Correct! Well done.

Incorrect.

The correct answer is B) Modules are binary interface units that expose only explicitly exported symbols, eliminating preprocessor include overhead and macro leakage

B

Correct Answer

Modules are binary interface units that expose only explicitly exported symbols, eliminating preprocessor include overhead and macro leakage

Explanation

C++20 modules (export module mylib;) compile once and provide a binary module interface. They improve build times, prevent macro pollution, and enforce encapsulation.

Progress
75/100