c语言函数库-第一章(C标准库)(国外英语资料)
c语言函数库-第一章(C标准库)(国外英语资料)
C language library
Chapter 1 (C Standard Library)
1. : diagnosis
2. : character category testing
3. : error handling
4. : integer constant
5. : Regional Environment
6. : mathematical function
7. : non local jump
8. : signal
9. : variable parameter table
10. : public definition
11. : I / O
12. : utility function
13. : date and time function
1. : diagnosis
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
Then invoke the abort to terminate the execution of the program.
In , 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 is included.
2. : character category testing
Functions that define test characters are defined in header file . 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 is as follows:
Functions defined in
Function definition, function brief introduction
Int isalnum (int c) to check whether the characters are letters or numbers
Int isalpha (int c) to check if the characters are letters
Int isascii (int c) to check whether the characters are ASCII code
Int iscntrl (int c) to check whether the characters are control characters
Int isDigit (int c) to check whether the characters are numeric characters
Int isgraph (int c) to check whether the c