I looked, but could not find a decent answer.
I was wondering how printf works in this case:
char arr[2] = {5,6}; printf ("%d%d",arr[0],arr[1]);
I thought printf was just looking at the format and when it gets% d, for example, it reads 4 bytes from the current position ... however, this should be wrong because it works fine.
So where am I mistaken?
c memory printf
Idan
source share