Home / General Knowledge / Testing New :: Discussion

Discussion :: Testing New

  1. Determine output:

    void main()

    {

    int const *p=5;

    printf("%d", ++(*p));

    }

  2. A.

     6

    B.

     5

    C.

     Garbage Value

    D.

     Compiler Error

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".


Be The First To Comment