...
The atoi(), atol(), atoll(), and atof() functions convert the initial portion of a string token to int, long int, long long int, and double representation, respectively. Except for the behavior on error (C23[ISO/IEC 9899:2011], s7.2423.1.2), they are equivalent to
| Code Block |
|---|
atoi: (int)strtol(nptr, (char **)NULL, 10) atol: strtol(nptr, (char **)NULL, 10) atoll: strtoll(nptr, (char **)NULL, 10) atof: strtod(nptr, (char **)NULL) |
...