You cannot directly stop sscanf()the execution of the fact that it is designed and specified for execution. However, you can use a little-known and rarely used function sscanf()to make it easy to detect that a problem has occurred:
int i;
if (sscanf(sInput, "%d%n", &iAssignmentMarks[0], &i) != 1)
...failed to recognize an integer...
else if (!isspace(sInput[i]) && sInput[i] != '\0')
...character after integer was not a space character (including newline) or EOS...
%n , , ( ). %n sscanf() C89.
strtol() - ( , , sscanf(), ). , .