Home » C++ Programming » Preprocessor » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    #define Function(id) cout << "The value of " #id " is "< int main()
    {
    int Num = 100;
    Function(Num);
    return 0;
    }
    1. The value of Num is 10
    2. The value of Num is 100
    3. The value of Num is 1000
    4. Compilation Error
    5. None of these
Correct Option: B

In this program, we are just printing the declared values and it's id.



Your comments will be displayed only after manual approval.