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