Home / General Knowledge / Testing New :: Discussion

Discussion :: Testing New

  1. Determine Output:

    void main()

    {

    char *p;

    p="%dn";

    p++;

    p++;

    printf(p-2, 300);

    }

  2. A.

     %d\n

    B.

     300

    C.

     Error

    D.

     None of These

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    The pointer points to % since it is incremented twice and again decremented by 2, it points to '%d\n' and 300 is printed.


Be The First To Comment