Home » C++ Programming » Preprocessor » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    #define funOfSquare(num) num * num
    int main()
    {
    int num;
    cout << funOfSquare(num + 12);
    return 0;
    }
    1. 144
    2. Compilation Error
    3. Runtime Error
    4. Garbage value
    5. None of these
Correct Option: E

In this program, as we have not initialize the variable num, we will get a output of ending digit of 12.



Your comments will be displayed only after manual approval.