C: using strtol endptr is never NULL, cannot check if value is integer only?
Assuming that earlier code has already split up the line into individual numbers, then the check you want is strtol will never set endtoken to a null pointer; it will set it to point to the first character that is not a digit. If that character is the NUL string terminator (note the slightly different … Read more