514 views
0 0 votes
Explain the output

Main()

{

    char *s= "%d\n";

     s++;

     s++;

     printf(s-2,300);

}

1 Answer

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

answer is 300
Position:
Show:

No related questions found