Interview answers verified by specialists.

Find interview questions and answers on this website:

See right interview answers on 30 common job interview questions


only the #define statement and not several instances of individual constants throughout your program. For
declare a constant for pi as follows:

#define PI 3.14159

This way, if you wanted to expand the precision of pi for more accuracy, you could change it in one place
rather than several places. Usually, it is best to put #define statements in an include file so that several
modules can use the same constant value.

up the least memory. Constants defined in this manner are simply placed directly into your source code, with
constants created using the #define method.

Constants defined with the #define method can also be overridden using the #undef preprocessor directive.
This means that if a symbol such as NULL is not defined the way you would like to see it defined, you can
remove the previous definition of  NULL and instantiate your own custom definition.