2 votes 2 votes # include <stdio.h> int main() { char *s1 = "1234", *p; p = s1 + 2; //*p = '0'; printf("%d", *p); } The above code prints 51, any idea why? Kiran Karwa asked Jan 15, 2018 Kiran Karwa 295 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Anu007 commented Jan 15, 2018 reply Follow Share b/c of %d used , if you use %c then it prints 3 0 votes 0 votes joshi_nitish commented Jan 15, 2018 reply Follow Share because as soon as you wrote "1234", it becomes string constant and every symbol written inside " " is treated as character instead of numeric values. 1 votes 1 votes Kiran Karwa commented Jan 15, 2018 reply Follow Share Got it! Thanks:) 0 votes 0 votes Please log in or register to add a comment.