W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
16 questions for “Preprocessor & Macros”
Found in 1 field. Select a question to see its full answer.
Matching topics
C++
Preprocessor
&
Macros
10
Information Technology
16 questions in 1 technology
#
Question
Technology
Topic
Level
1
What is the C++
preprocessor
?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Beginner
2
What are predefined
macros
like __LINE__ and __FILE__?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Beginner
3
Why are function-like
macros
discouraged in modern C++?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Intermediate
4
What are the dangers of
macros
affecting names and how do you mitigate them?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Advanced
5
What is the difference between #include with angle brackets and quotes?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Beginner
6
What is an include guard and why is it needed?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Beginner
7
What are conditional compilation directives used for?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Intermediate
8
What is the difference between a macro constant and a constexpr/const constant?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Intermediate
9
What are the # (stringize) and ## (token paste) operators?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Advanced
10
How does #pragma once compare to traditional include guards?
C++ › Preprocessor & Macros
C++
Preprocessor
&
Macros
Advanced
Show all 16 questions in Information Technology