5
Which keyword is used to define the macros in C++?
EXPLANATION
C++ Programming
- C/C++ Preprocessor Directives for Macros:
- In C and C++, the preprocessor directive
#defineis used to define symbolic constants and parameterized macros:
#define PI 3.14159
#define SQUARE(x) ((x) * (x))
- The preprocessor replaces macro occurrences before actual compilation.
- Conclusion: #define (Option 2).
Correct option: (2) #define
Explanation not matching this question?
क्या व्याख्या इस प्रश्न से मेल नहीं खा रही?
Report
Want to practice this paper in exam conditions?
क्या आप परीक्षा जैसे माहौल में अभ्यास करना चाहते हैं?
Test yourself in 5-question batch format with timer and hidden answers.
5-प्रश्नों के बैच फॉर्मैट, टाइमर और छिपे उत्तरों के साथ खुद को परखें।
Start Practice Mode →
प्रैक्टिस टेस्ट मोड शुरू करें →