First of all no you can use strcmp to compare the user input and other data, but id suggesust using strcmpi ( )
And then a question about the comparisment of the correct- and persons answer, I could use strcmp to compare them, but as far as I remember strcmp takes to const char variables, and the answer variable would not be const because I would like to use the same variable through the program, I this going to be a problem?
- this function isnt case sensitive else somebody would fill in an answer like GANGLYLAMB while in your data it is ganglylamb thus counting the answer as wrong...)
int strcmpi(const char *s1, const char *s2);
Compares one string to another, without case sensitivity.
strcmpi performs an unsigned comparison of s1 to s2, without case sensitivity (same as stricmp
--implemented as a macro).
It returns a value (< 0, 0, or > 0) based on the result of comparing s1 (or part of it) to s2 (or part of it).