Common C function libraries

Source: Internet
Author: User
Character Processing Function this class function is used to process a single character, including the class test of the character and the ctype header file for case-insensitive conversion of the character. H function list <> function category function purpose description character test whether the letter and number isalnum are letters isalpha whether to control the character iscntrl whether the number isdigit can display characters (except spaces) whether isgraph can display characters (including spaces) Whether isprint is neither a space, it is not a printable character of letters and numbers ispunct whether space isspace whether capital letter isupper whether hexadecimal number (0-9, A-F) the uppercase and lowercase Conversion Function of the isxdigit character is used to convert the uppercase letter toupper to the lowercase letter tolower. This function is used to handle language differences in different countries. Header file local. H function list function category function purpose description region control region setting setlocale digital format Convention query country currency, date, time format conversion localeconv mathematical function this classification provides various mathematical functions, it must be noted that the data format in ansi c does not conform to the ieee754 standard, while some C language compilers follow the math header file of ieee754 (for example, frinklin C51. H function list function category function purpose details error condition processing definition field error (function input parameter value is not within the specified range) value range error (function return value is not within the specified range) trigonometric function arccosine ACOs arcsin asin arctangent atan arctangent 2 atan2 cosine cos sin tangent tan hyperbolic function hyperbolic cosine cosh hyperbolic Sinh hyperbolic tangent Tanh and logarithm exponent function exp exponent decomposition function frexp Product exponential Function fdex P natural logarithm log base-10 logarithm log10 floating point number decomposition function MODF power function POW square root function SQRT integer truncation, the lower limit of the absolute value and the remainder function is close to the integer Ceil absolute value. The upper limit of the fabs function is close to the integer floor. The fmod function is used to directly jump to the code between different base functions. Header file setjmp. h Io. H function list function category function purpose description save CALL Environment setjmp resume CALL Environment longjmp signal processing this classification function is used to process exceptions that occur during program execution. Header file signal. H function list function category function usage details specified signal processing function signal send signal raise Variable Parameter processing this function is used to implement variable base functions such as printf, scanf and other parameters. Header file stdarg. H function list function category function purpose description Variable Parameter access macro variable parameter start macro va_start Variable Parameter end macro va_end Variable Parameter access macro access next variable parameter macro va_arg input and output function this category is used for processing including various input and output devices such as files and the console, various functions implement the header file stdio in the form of "stream. H function list function category function purpose description file operation delete file remove Modify file name rename generate temporary file name tmpfile get temporary file path tmpnam file access close file fclose refresh buffer fflush open file fopen will existing stream pointer and new file connection freopen setting disk buffer setbuf setting disk buffer setvbuf format input and output function Format output fprintf format input fscanf format output (console) printf format input (console) S CANF format output to buffer sprintf format input in buffer format sscanf format output vfprintf format output vprintf format output vsprintf character input output function input one character fgetc string input fgets character output fputc string output fputs Character Input (console) GETC character input (console) getchar string input (console) gets character output (console) putc character output (console) putchar string output (console) puts character output to the stream header ungetc direct input and output direct stream read operation fread direct stream write operation fwrite file location function get File Location fgetpos File Location move fseek file location set fsetpos get File Location ftell file Location reset zero-bit remind error handler function error clearing clearerr file end judgment feof File error detection ferror get error prompt string perror utility function this category provides some functions cannot be classified by the above, but it is required for programming. Header file stdlib. H function list function category function purpose description String Conversion Function String Conversion to integer atoi String Conversion to long integer atol String Conversion to floating point strcto String Conversion to long integer strtol String Conversion to unsigned Length integer strtoul pseudo-random sequence generation function generate random number Rand set the starting value of the random function srand storage management function allocation memory calloc release memory free memory allocation malloc re-allocation memory realloc environment communication abort program abort exit Program run, and clear the environment variable atexit exit program execute exit read environment parameter getenv program suspension, temporarily execute another program system search and sort tool binary search (data must be sorted) bsearch quick sorting qsort integer arithmetic function evaluate absolute value ABS Div get Division Arithmetic Operator bottom quotient and remainder evaluate long integer bottom absolute value labs evaluate Length Integer Division operator and remainder ldiv multibyte character function get multibyte character mblen get multibyte character number mbtowc multibyte character conversion wctomb multibyte character string operation will be multibyte string to integer array mbstowcs convert multi-byte string to character array mcstowbs string processing this classification function is used for string merging, comparison, and other operations header file string. H function list function category function purpose description string copy block copy (the destination and source storage areas cannot overlap) memcpy block copy (the destination and source storage areas can overlap) memmove string copy strcpy copy by length string strncpy string connection function string connection strcat by length connection string strncat string comparison function block comparison memcmp string comparison strcmp string (for non-English characters) comparison of strcoll string by length strncmp String Conversion strxfrm characters and characters String search character search memchr character search strchr string SEARCH strcstp string SEARCH strpbrk string SEARCH strstp string SEARCH strstr string decomposition strtok miscellaneous function string set memset error string ing strerror evaluate String Length strlen Date and Time Functions this category provides the time and date processing function header file time. H function list function category function purpose description time operation function get processor time clock get time difference difftime set time mktime get time Conversion Function get time asctime represented in ASCII code get String Representation time ctime gets the future development direction of the time strftime function library in the specified format. This section describes how function libraries of various types will develop in the future. Serial number Library category header file DETAILS 1 error handling errno. H 2 character processing ctype. H 3 regionalization local. H 4 mathematical functions math. H 5 signal processing signal. H 6 Input and Output stdio. H 7 utility program stdlib. H 8 string processing string. h
Comment |

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.