Did you try it? It's just logic. Strtok says it will deliver you the address of the next token, for each call, or a NULL when there's no new token. That's pretty clear. It doesn't promise to deliver the address of a token when there's no token. It's YOUR job to check that out. It doesn't promise to work if you dereference a NULL. It leaves the results of that up to the language (which forbids it) and the implementation, which seems, in this case, to give you a seg fault. It could burn your machine to a slag heap and cause your homework to eat the dog, and still comply with the standard.

You are flirting with danger in other respects. Just because you define the command to have a maximum of 9 characters, and the arguments to have a maximum of 19 characters, do you think that forces your user to obey? I don't know about you, but MY users are uninformed or lazy or malicious or fall asleep with their forehead on the keyboard. It is MY job, and YOUR job, to handle those eventualities.

We can ignore our jobs and issue updates to our programs for years, like MS, so long as we can convince people that they should pay us for the privilege of giving them crap code. Personally, I haven't been able to do that.