c语言标准库函数查询手册 c语言标准库函数有哪些( 二 )


setbuf() set the buffer for a specific stream
setvbuf() set the buffer and size for a specific stream
sprintf() write formatted output to a buffer
sscanf() read formatted input from a buffer
tmpfile() return a pointer to a temporary file
tmpnam() return a unique filename
ungetc() puts a character back into a stream
vprintf, vfprintf, vsprintf write formatted output with variable argument lists
标准字符/字符串处理函数
atof() converts a string to a double
atoi() converts a string to an integer
atol() converts a string to a long
isalnum() true if alphanumeric
isalpha() true if alphabetic
iscntrl() true if control character
isdigit() true if digit
isgraph() true if a graphical character
islower() true if lowercase
isprint() true if a printing character
ispunct() true if punctuation
isspace() true if space
isupper() true if uppercase character
isxdigit() true if a hexidecimal character
memchr() searches an array for the first occurance of a character
memcmp() compares two buffers
memcpy() copies one buffer to another
memmove() moves one buffer to another
memset() fills a buffer with a character
strcat() concatenates two strings
strchr() finds the first occurance of a character in a string
strcmp() compares two strings
strcoll() compares two strings in accordance to the current locale
strcpy() copies one string to another
strcspn() searches one string for any characters in another
strerror() returns a text version of a given error code
strlen() returns the length of a given string
strncat() concatenates a certain amount of characters of two strings
strncmp() compares a certain amount of characters of two strings
strncpy() copies a certain amount of characters from one string to another
strpbrk() finds the first location of any character in one string, in another string
strrchr() finds the last occurance of a character in a string
strspn() returns the length of a substring of characters of a string
strstr() finds the first occurance of a substring of characters
strtod() converts a string to a double
strtok() finds the next token in a string
strtol() converts a string to a long
strtoul() converts a string to an unsigned long
strxfrm() converts a substring so that it can be used by string comparison functions
tolower() converts a character to lowercase
toupper() converts a character to uppercase
标准数学函数
abs() absolute value
acos() arc cosine
asin() arc sine
atan() arc tangent
atan2() arc tangent, using signs to determine quadrants
ceil() the smallest integer not less than a certain value
cos() cosine
cosh() hyperbolic cosine
div() returns the quotient and remainder of a division
exp() returns "e" raised to a given power
fabs() absolute value for floating-point numbers
floor() returns the largest integer not greater than a given value
fmod() returns the remainder of a division
frexp() decomposes a number into scientific notation
labs() absolute value for long integers
ldexp() computes a number in scientific notation
ldiv() returns the quotient and remainder of a division, in long integer form
log() natural logarithm
log10() natural logarithm, in base 10
modf() decomposes a number into integer and fractional parts
pow() returns a given number raised to another number
sin() sine
sinh() hyperbolic sine
sqrt() square root
tan() tangent
tanh() hyperbolic tangent
标准时间/日期函数
asctime() a textual version of the time
clock() returns the amount of time that the program has been running
ctime() returns a specifically formatted version of the time
difftime() the difference between two times

推荐阅读