Hi, I am sure this question must have been asked before but I can't find it anyway.
I have initialised an array of strings
char names[][90]
I don't understand why
char names[2] = "Bert"
doesn't work (incompatible assignment error), even so I have tried
dir[2][90] = "Bert" and strcpy("Bert", dir[2])
but the latter just crashes the program.
On a slightly related topic I was also wondering why you can use terminate for loops of a string like this
char name[] = "Bert";
for(int i =0; name[i]; i++)
Yet if I put "Be0rt" it doesn't terminate when it sees the zero only the null terminator. Is this because 0 doesn't have the value of zero in ASII or is there another reason?