cppreference.com > All C Functions
All C Functions
#, ##manipulate strings
#definedefine variables
#errordisplay an error message
#if, #ifdef, #ifndef, #else, #elif, #endifconditional operators
#includeinsert the contents of another file
#lineset line and file information
#pragmaimplementation specific command
#undefused to undefine variables
Predefined preprocessor variablesmiscellaneous preprocessor variables
abortstops the program
absabsolute value
acosarc cosine
asctimea textual version of the time
asinarc sine
assertstops the program if an expression isn't true
atanarc tangent
atan2arc tangent, using signs to determine quadrants
atexitsets a function to be called when the program exits
atofconverts a string to a double
atoiconverts a string to an integer
atolconverts a string to a long
bsearchperform a binary search
callocallocates a two-dimensional chunk of memory
ceilthe smallest integer not less than a certain value
clearerrclears errors
clockreturns the amount of time that the program has been running
coscosine
coshhyperbolic cosine
ctimereturns a specifically formatted version of the time
difftimethe difference between two times
divreturns the quotient and remainder of a division
exitstop the program
expreturns "e" raised to a given power
fabsabsolute value for floating-point numbers
fcloseclose a file
feoftrue if at the end-of-file
ferrorchecks for a file error
fflushwrites the contents of the output buffer
fgetcget a character from a stream
fgetposget the file position indicator
fgetsget a string of characters from a stream
floorreturns the largest integer not greater than a given value
fmodreturns the remainder of a division
fopenopen a file
fprintfprint formatted output to a file
fputcwrite a character to a file
fputswrite a string to a file
freadread from a file
freemakes memory available for future allocation
freopenopen an existing stream with a different name
frexpdecomposes a number into scientific notation
fscanfread formatted input from a file
fseekmove to a specific location in a file
fsetposmove to a specific location in a file
ftellreturns the current file position indicator
fwritewrite to a file
getcread a character from a file
getcharread a character from STDIN
getenvget enviornment information about a variable
getsread a string from STDIN
gmtimereturns a pointer to the current Greenwich Mean Time
isalnumtrue if a character is alphanumeric
isalphatrue if a character is alphabetic
iscntrltrue if a character is a control character
isdigittrue if a character is a digit
isgraphtrue if a character is a graphical character
islowertrue if a character is lowercase
isprinttrue if a character is a printing character
ispuncttrue if a character is punctuation
isspacetrue if a character is a space character
isuppertrue if a character is an uppercase character
isxdigittrue if a character is a hexidecimal character
labsabsolute value for long integers
ldexpcomputes a number in scientific notation
ldivreturns the quotient and remainder of a division, in long integer form
localtimereturns a pointer to the current time
lognatural logarithm
log10natural logarithm, in base 10
longjmpstart execution at a certain point in the program
mallocallocates memory
memchrsearches an array for the first occurance of a character
memcmpcompares two buffers
memcpycopies one buffer to another
memmovemoves one buffer to another
memsetfills a buffer with a character
mktimereturns the calendar version of a given time
modfdecomposes a number into integer and fractional parts
perrordisplays a string version of the current error to STDERR
powreturns a given number raised to another number
printfwrite formatted output to STDOUT
putcwrite a character to a stream
putcharwrite a character to STDOUT
putswrite a string to STDOUT
qsortperform a quicksort
raisesend a signal to the program
randreturns a pseudorandom number
reallocchanges the size of previously allocated memory
removeerase a file
renamerename a file
rewindmove the file position indicator to the beginning of a file
scanfread formatted input from STDIN
setbufset the buffer for a specific stream
setjmpset execution to start at a certain point
setlocalesets the current locale
setvbufset the buffer and size for a specific stream
signalregister a function as a signal handler
sinsine
sinhhyperbolic sine
sprintfwrite formatted output to a buffer
sqrtsquare root
srandinitialize the random number generator
sscanfread formatted input from a buffer
strcatconcatenates two strings
strchrfinds the first occurance of a character in a string
strcmpcompares two strings
strcollcompares two strings in accordance to the current locale
strcpycopies one string to another
strcspnsearches one string for any characters in another
strerrorreturns a text version of a given error code
strftimereturns individual elements of the date and time
strlenreturns the length of a given string
strncatconcatenates a certain amount of characters of two strings
strncmpcompares a certain amount of characters of two strings
strncpycopies a certain amount of characters from one string to another
strpbrkfinds the first location of any character in one string, in another string
strrchrfinds the last occurance of a character in a string
strspnreturns the length of a substring of characters of a string
strstrfinds the first occurance of a substring of characters
strtodconverts a string to a double
strtokfinds the next token in a string
strtolconverts a string to a long
strtoulconverts a string to an unsigned long
strxfrmconverts a substring so that it can be used by string comparison functions
systemperform a system call
tantangent
tanhhyperbolic tangent
timereturns the current calendar time of the system
tmpfilereturn a pointer to a temporary file
tmpnamreturn a unique filename
tolowerconverts a character to lowercase
toupperconverts a character to uppercase
ungetcputs a character back into a stream
va_arguse variable length parameter lists
vprintf, vfprintf, and vsprintfwrite formatted output with variable argument lists