0 0 votes Explain the output Main() { char *s= "%d\n"; s++; s++; printf(s-2,300); } Programming in C + – Priyanka17 514 views answer comment Share Follow Print See 1 comment 1 1 comment reply Shaik Masthan commented Oct 5, 2018 reply Follow flag these type of questions never asked in GATE, don't waste your time on this 1 1 replyShare Please log in or register to add a comment.
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 Raghava45 answered Oct 5, 2018 Raghava45 comment Share Follow See 1 comment 1 1 comment reply Priyanka17 commented Oct 5, 2018 reply Follow flag That I know but m confused how pointer is replaced by its value? 0 0 replyShare Please log in or register to add a comment.