Why is the following code valid for a char pointer but not for a int pointer?
I am confused as to why I cant use the same approach for both.
But this will failCode:char *y; y = “This is great”; printf(“%s”, y);
Code:int *x; x = 25; printf(“%d”, x);