Determine Output:
void main()
{
char *p;
p="%d\n";
p++;
p++;
printf(p-2, 300);
}
void main()
{
char *p;
p="%d\n";
p++;
p++;
printf(p-2, 300);
}A. %d\n
B. 300
C. Error
D. None of These
Answer: Option B
Solution (By Examveda Team)
The pointer points to % since it is incremented twice and again decremented by 2, it points to '%d\n' and 300 is printed.

Can anyone explain how 300 is printed