C/C++ Preprocessor directives basics Preprocessor directives: In almost every program we come across in C/C++, we see a few lines at the top of the… Read More »
Prerequisite – Macros What is the output of following program? Output: Error Description: Compiler can not resolve the scope and thus it does’nt know which… Read More »
As the name suggests Preprocessors are programs that processes our source code before compilation. There are a number of steps involved between writing a program… Read More »
Macros are pre-processed which means that all the macros would be processed before your program compiles. However, functions are not preprocessed but compiled. See the… Read More »
How to print and store a variable name in string variable?
Give a = 12 and b = 36 write a C function/macro that returns 3612 without using arithmetic, strings and predefined functions.
#define is a preprocessor directive. Things defined by #define are replaced by the preprocessor before compilation begins.
In a C program, all lines that start with # are processed by preprocessor which is a special program invoked by the compiler.
Predict the output of the below program