Answers for "how to check if a string is a number C"

C
2

c string is int

int isNumber(char s[])
{
    for (int i = 0; s[i]!= ''; i++)
    {
        if (isdigit(s[i]) == 0)
              return 0;
    }
    return 1;
}
Posted by: Guest on October-25-2020
2

check if string in string c

if(strstr(sent, word) != NULL) {
    /* ... */
}
Posted by: Guest on February-23-2020

Code answers related to "how to check if a string is a number C"

Code answers related to "C"

Browse Popular Code Answers by Language