char str[2] = "\0"; /* gives {\0, \0} */ str[0] = fgetc(fp);. You could use the second line in a loop with what ever other string operations you ... ... <看更多>
Search
Search
char str[2] = "\0"; /* gives {\0, \0} */ str[0] = fgetc(fp);. You could use the second line in a loop with what ever other string operations you ... ... <看更多>
In C (and you've tagged this as C), that's pretty much the only way to initialize an array of char with a string value (initialization is different from ... ... <看更多>