1) What is a C++ preprocessor?
The preprocessors are the directives, which give instruction to the compiler to preprocess the information before actual compilation starts. All preprocessor directives begin with #, and only white-space characters may appear before a preprocessor directive on a line.
2) Explain #define pre-processor with example .
#define is the preprocessor directive in c and c++ language. It is used to define the preprocessor macros for the texts. The #define is used to make substitutions throughout the file in which it is located
Eg
#define MAX 50
void main()
{
int Array[MAX]; // declares Array with the size of 50
}
3)
The preprocessors are the directives, which give instruction to the compiler to preprocess the information before actual compilation starts. All preprocessor directives begin with #, and only white-space characters may appear before a preprocessor directive on a line.
2) Explain #define pre-processor with example .
#define is the preprocessor directive in c and c++ language. It is used to define the preprocessor macros for the texts. The #define is used to make substitutions throughout the file in which it is located
Eg
#define MAX 50
void main()
{
int Array[MAX]; // declares Array with the size of 50
}
3)
No comments:
Post a Comment