Oct 28, 2022 at 1:43pm
Your problem is more with the printf statement than the array. s requires a null-terminated string.
Try
printf("%c\n", input[0][0]);
in either example instead.
I don't think your second code should work. It should be const char *
, not char *
Last edited on Oct 28, 2022 at 1:45pm