Home / General Knowledge / Testing New :: Discussion

Discussion :: Testing New

  1. Determine Output:

    #define square(x) x*x

    void main()

    {

    int i;

    i = 64/square(4);

    printf("%d", i);

    }

  2. A.

     4

    B.

     64

    C.

     16

    D.

     None of These

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    The macro call square(4) will substituted by 4*4 so the expression becomes i = 64/4*4 . Since / and * has equal priority the expression will be evaluated as (64/4)*4 i.e. 16*4 = 64


Be The First To Comment