answersLogoWhite

0

If the character's ASCII value is in the range of the digit characters, then it is a numeric. In ASCII, the range of digits is from '0' to '9' (48 to 57 decimal). Note that character constants such as '0' will implicitly convert to the constant integer 48 (the ASCII code for the character) so there is no need to remember the actual value; the compiler can determine this for us.

The following function shows how one might test a character to see if it is a digit or not:

bool is_digit (const char c) {

return (c>='0' && c<='9');

}

The function will return true if the given character is a digit, otherwise it will return false.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

How to check whether a character is numeric in an alphanumeric field in easytrieve.?

IF WS-AGE NUMERIC DISPLAY "NUMERIC" ELSE DISPLAY "NOT NUMERIC' END-IF


Which function can be used to check whether the value is numeric or not?

In Excel you can use the ISNUMBER() function.


What is the process for resolving a numeric amount missing on a check?

To resolve a missing numeric amount on a check, contact the issuer of the check and request clarification or a replacement check. You may need to provide details such as the check number and date of issuance for them to assist you in resolving the issue.


How many digits make up an international bank account number?

There are: IBAN header - 2 alpha characters + 2 digit check digit Bank code - 4 alpha characters Sort code - 6 digits Account number - 8 digits Making a total of 22 alphanumeric characters (of which 16 are [numeric] digits).


How do you write $700 on a check?

To write $700 on a check, write &quot;Seven hundred and 00/100&quot; on the line provided for the written amount. In the box where you indicate the numeric amount, write &quot;700.00.&quot; Ensure that both the written and numeric amounts match to avoid any confusion. Finally, sign the check at the bottom right to validate it.


How do you check whether we are lack of oxygen?

We can check by breathing and we will feel difficult to breathe then this is how we check whether we are lack of oxygen.


What would i do to help me determine if something is metal?

Check the conductivity. Check whether it is lustrous. Check whether it is malleable.


Have mineral crystals arranged in bands?

Yes. The most extreme examples of this would be the micas, and perhaps graphite. You may like to check whether talc also has this character.


Write a program to adentify whether a character entered by a user is a vowel or a consonant?

You can check the value of a character by using if statements.Also, note that this code does not check for capital letters./* code */#include int main(){char c;c = getc(stdin);if (c 'o') {/* If the character is a vowel, this code will be executed. */} else if (c >= 'a' && c


How do you know that a numeric is palindrome or not using c or pascal language?

Reverse the digits then check of the new number is the same as the original number.


I looking for vin check up for car whether it was flooded or not?

I am looking for a vin check up fro a car whether it was flooded or not flooded check up


How do you check whether your new N96 is original Nokia Finland?

How do you check whether your new N96 is original Nokia Finland?