Originally Posted by
tabstop
Each array element is a char. So they can't all be in the same array element?
I suppose you could initialize a string to that quoted thing, but that would give you a string of "first string" and some extra, but unrelated, memory that would happen to make sense when interpreted as characters. (In other words, if you tried to use in a library function or whatever, you would never get the second part.)
This is what I mean:
Code:
char array[] = { "the\0 candle" };
So what can strnlen(array). tell us about the size of the array?
I don't believe it can be accurate, but I'll try it in a bit, and see.
Sorry about the same "element", clearly the wrong word, I meant in the same dimension.