Search
 
SCRIPT & CODE EXAMPLE
 

C

check command line input is a number in c

bool isNumber(char number[])
{
    int i = 0;

    //checking for negative numbers
    if (number[0] == '-')
        i = 1;
    for (; number[i] != 0; i++)
    {
        //if (number[i] > '9' || number[i] < '0')
        if (!isdigit(number[i]))
            return false;
    }
    return true;
}
Comment

PREVIOUS NEXT
Code Example
C :: writing structures in c 
C :: logical operators 
C :: Increment & Decrement Operator in C language 
C :: c calling a function 
C :: realloc in c 
C :: how to input a string into a char array cpp 
C :: owasp 
C :: How to send an array through a pipe 
C :: localStorage.setItem multpile arra 
C :: gcc compiler for windows 10 
C :: do a barrel roll 
C :: Syntax for creating a node 
C :: how to find adam number uasing loop in C 
C :: esp local control 
C :: how to pprint otu a double in in c 
C :: C access global variable same name 
C :: can we update values of a map via traversing 
C :: Uri/beecrowd problem no - 1131 solution in C 
C :: Multi Select with icons htm; 
C :: pdo crud 
C :: C Why enums are used? 
C :: C Nested if...else 
C :: c check if character is a punctuation 
C :: largest value in u32 
C :: + ********************* 
C :: wordpress clean name spaces 
C :: c arrays 
C :: c program for determining a character is alphabet or not 
Dart :: how can i move floating action button to center flutter 
Dart :: flutter width infinity 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =