248 views
1 votes
1 votes
Explain the output

Main()

{

    char *s= "%d\n";

     s++;

     s++;

     printf(s-2,300);

}

1 Answer

0 votes
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

No related questions found