C standard library (c 标准库文库)
The C standard library. Txt43 Library of the sails, not hanging on the mast, is a useless piece of cloth: the mast, don't hang up the sails, is a normal column; ideals into action is not action, with no reality whatever fog: but not ideal, is not only taking the end of the road. 44 often unlatched the door of success, as long as you are brave to push, it will suddenly open. <assert. h>: diagnosis
<assert. h> defines only a macro assert with a reference, which is defined as follows:
Void assert (int expression)
The assert macro is used to add diagnostic features to a program, which can test a condition and possibly terminate the program. Execute statement:
Assert (expression);
When the expression is 0, a message is displayed at the terminal:
Assertion failed: 0, file source file name, line line number
Abnormal program termination
isalpha 函数
Then invoke the abort to terminate the execution of the program.
In〈assert. h>, the macro assert is defined as conditional compilation, and if the macro NDEBUG is defined in the source
file, the assert macro will be ignored even if the header file <assert. h> is included
<ctype. h>: character class testing
Functions that define test characters are defined in header file <ctype.h>. In these functions, the arguments for each function are integer int, and each parameter is either EOF or char type. The list of standard functions defined in <ctype. h> is as follows:
Functions defined in <ctype. h>
Function definition
Function brief introduction
Int isalnum (int c)
Check whether the characters are letters or numbers
Int isalpha (int c)
Check if the characters are letters
Int isascii (int c)
Check if the character is ASCII
Int isDigit (int c)
Check that the characters are numeric characters Int isgraph (int c)
Check that the characters are printable characters Int islower (int c)
Check if the characters are lowercase letters
Int isprint (int c)
Check that the characters are printable characters Int ispunct (int c)
Check if the characters are punctuation characters Int isspace (int c)
Check if the character is a space character
Int isupper (int c)
Check if the characters are uppercase letters
Check if the character is a sixteen digit numeric character
Int toupper (int c)
Converts lowercase letters to uppercase letters
Int tolower (int c)
Converts uppercase letters to lower case letters
These standard functions defined in <ctype. h>, and some commonly used nonstandard character processing functions, will be described in detail in the Eleventh chapter.
<errno. h>: error handling
Two constants, one variable, are defined in <errno. h>,
1,EDOM
It represents the wrong code for mathematical domain errors.
2,ERANGE
It represents an error code that results out of bounds.
3,errno
This is a variable that is set to indicate the type of error in the system call.
<limits. h>: integer constant
In header file <limits. h>, some constants that represent integer sizes are defined. The following are the expressions and meanings of these constants, as shown in the following table.
Character constants defined in <limits. h>
character constants
Value
Meaning
CHAR_BIT
Eight
Number of char types
CHAR_MAX
255 or 127
Char type maximum
CHAR_MIN
Char type minimum
INT_MIN