Home / General Knowledge / Testing New :: Discussion

Discussion :: Testing New

  1. Determine Output:

    #include<stdio.h>

    #define a 10

    void main()

    {

    #define a 50

    printf("%d", a);

    }

  2. A.

     50

    B.

     10

    C.

     Compiler Error

    D.

     None of These

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    The preprocessor directives can be redefined anywhere in the program. So the most recently assigned value will be taken.


Be The First To Comment