1.

How are the constants declared?(a) const keyword(b) #define preprocessor(c) both const keyword and #define preprocessor(d) $defineThis question was addressed to me during an online interview.My doubt is from Constants in chapter Types, Pointers, Arrays & Structures in C++ of C++

Answer» CORRECT choice is (C) both const keyword and #define preprocessor

The explanation: The const will declare with a SPECIFIC TYPE value and #define is used to declare user-defined CONSTANTS.


Discussion

No Comment Found

Related InterviewSolutions