All fields

“Preprocessor & Macros” in Information Technology

16 questions across 1 technology.

Information Technology

16 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is the C++ preprocessor? C++ › Preprocessor & MacrosC++Preprocessor & MacrosBeginner
2What are predefined macros like __LINE__ and __FILE__? C++ › Preprocessor & MacrosC++Preprocessor & MacrosBeginner
3Why are function-like macros discouraged in modern C++? C++ › Preprocessor & MacrosC++Preprocessor & MacrosIntermediate
4What are the dangers of macros affecting names and how do you mitigate them? C++ › Preprocessor & MacrosC++Preprocessor & MacrosAdvanced
5What is the difference between #include with angle brackets and quotes? C++ › Preprocessor & MacrosC++Preprocessor & MacrosBeginner
6What is an include guard and why is it needed? C++ › Preprocessor & MacrosC++Preprocessor & MacrosBeginner
7What are conditional compilation directives used for? C++ › Preprocessor & MacrosC++Preprocessor & MacrosIntermediate
8What is the difference between a macro constant and a constexpr/const constant? C++ › Preprocessor & MacrosC++Preprocessor & MacrosIntermediate
9What are the # (stringize) and ## (token paste) operators? C++ › Preprocessor & MacrosC++Preprocessor & MacrosAdvanced
10How does #pragma once compare to traditional include guards? C++ › Preprocessor & MacrosC++Preprocessor & MacrosAdvanced
11What is the difference between an enum and a set of #define constants? C++ › Enums & Enum ClassesC++Enums & Enum ClassesBeginner
12What are the stages of building a C++ program? C++ › Compilation & LinkingC++Compilation & LinkingBeginner
13What is a translation unit? C++ › Compilation & LinkingC++Compilation & LinkingBeginner
14What is the difference between compile-time and link-time errors? C++ › Compilation & LinkingC++Compilation & LinkingBeginner
15Why do you need include guards or #pragma once, in linkage terms? C++ › Compilation & LinkingC++Compilation & LinkingIntermediate
16What are C++20 modules and how do they improve on headers? C++ › Compilation & LinkingC++Compilation & LinkingAdvanced