Open In App

Convert C/C++ program to Preprocessor code

Last Updated : 29 Aug, 2018
Comments
Improve
Suggest changes
3 Likes
Like
Report
We use g++ compiler to turn provided Cpp code into preprocessor code. To see the preprocessor code generated by the CPP compiler, we can use the “-E” option on the command line: Preprocessor include all the # directives in the code. and also expands MACRO function.
Syntax:
g++ -E filename.cpp
Running the command:
g++ -E geeks.cc
Output :
int main()
{

    int a = 10, b = 10;

    // Add two values.
    int c = a + b;

    return 0;
}

Next Article
Article Tags :
Practice Tags :

Similar Reads