char array not assignable

Yes char arrays are not assignable just as all arrays aren’t. You should use strcpy for example and so on. Also, you don’t need to declare char class[30]; the longest string I see in your code is “undefined” so should be ok, 9 characters of “undefined” + 1 null terminating byte ‘\0’. And you should … Read more

Char Comparison in C

I’m trying to compare two chars to see if one is greater than the other. To see if they were equal, I used strcmp. Is there anything similar to strcmp that I can use?

C: correct usage of strtok_r

The documentation for strtok_r is quite clear. The strtok_r() function is a reentrant version strtok(). The saveptr argument is a pointer to a char * variable that is used internally by strtok_r() in order to maintain context between successive calls that parse the same string. On the first call to strtok_r(), str should point to the string … Read more