Can anyone can explain what difference between an array of character and a C string? How does it behave in each type?
/* Define an array of character, but not string*/
char Char_Array[2] = {'T', 'F'};
/* Define a C string */
char String[3] = {'H', 'I', '\0'};
/* And below array will be treat as array of character or a C string */
char A[] = {'H','E','L','L','O'};
From above, which one is array of char, and
which one is C string?
Also, can I do like this:
for (i = 0; i<2; i++)
Char_Array[i]= 'T'; //all set to 'T'(true)
Thanks!
DV007