Why the following code prints "Huh?" ?
It seems that 0xFF is never appended to the list by strcat?
Code:#include <stdio.h> #include <string.h> const char * const eof = "\0xFF"; char list[2000] = {0}; void append (const char * flower) { strcat (list, flower); strcat (list, eof); } int main() { const char *next; append("Calla Lily"); append("Daisy"); append("Tulip"); next = strchr(list, 0xFF); if (!next) printf ("Huh?\n"); }