In the main function of C:
void main(int argc, char **argv) { // do something here }
In the command line, we will type any number for ex
A self-made solution:
bool isNumeric(const char *str) { while(*str != '\0') { if(*str < '0' || *str > '9') return false; str++; } return true; }
Note that this solution should not be used in production-code, because it has severe limitations. But I like it for understanding C-Strings and ASCII.