I was under the impression that
char word[5] = "hello";
is the same as
char *word = "hello";
because arrays always decay into a pointer?
I was under the impression that
char word[5] = "hello";
is the same as
char *word = "hello";
because arrays always decay into a pointer?
char *word = "hello";
Takes the address of a string literal. These are often held in read-only memory.