so I'm trying to iterate over a char array in c. The Array is defined in a header file like this.
char const SEQUENCE[] PROGMEM = "\MdTqZWYzVf5E661OAd4r7ylINBLNEAzO...
the array is well over 1 thousand characters in length.
next I've been told to use the extern key word to bring the array into my main.c file. this is how I've done that. Not sure if this is totally correct.
extern char const SEQUENCE[];
I've tried to loop over the array and pring each individual value like this.
for (uint8_t I = 0; I < 64; I++) { printf("%c ", SEQUENCE[I]); }
but I got this as an output.
␏ ␀ ␀ ␀ ␀ ␀ ␀ ..
I expected something like. M d T q ...
can anyone tell me what is going wrong here?
header:
c
This works, because
SEQUENCEis a string, and at the end (and only at the end) will be a null-terminater. This does not work, if you place one by yourself (with \0)