0% found this document useful (0 votes)
68 views

C Standard Library Function List

The document lists functions from standard C libraries along with their include files, function prototypes, and brief descriptions. It provides information on many common functions for input/output, math, time, memory allocation, and more.

Uploaded by

Prashan Chamara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

C Standard Library Function List

The document lists functions from standard C libraries along with their include files, function prototypes, and brief descriptions. It provides information on many common functions for input/output, math, time, memory allocation, and more.

Uploaded by

Prashan Chamara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

System

Function Include File Function Prototype Description

abort stdlib.h void abort(void); Stops a program abnormally.

abs stdlib.h int abs(int n); Calculates the absolute value of


an integer argument n.

acos math.h double acos(double x); Calculates the arc cosine of x.

asctime time.h char *asctime(const struct tm Converts the time that is stored
*time); as a structure to a character
string.

asctime_r time.h char *asctime_r (const struct tm Converts tm that is stored as a


*tm, char *buf); structure to a character string.
(Restartable version of asctime.)

asin math.h double asin(double x); Calculates the arc sine of x.

assert assert.h void assert(int expression); Prints a diagnostic message and


ends the program if the
expression is false.

atan math.h double atan(double x); Calculates the arc tangent of x.

atan2 math.h double atan2(double y, double Calculates the arc tangent of y/x.
x);

atexit stdlib.h int atexit(void (*func)(void)); Registers a function to be called


at normal termination.

atof stdlib.h double atof(const char *string); Converts string to a double-


precision floating-point value.

atoi stdlib.h int atoi(const char *string); Converts string to an integer.

atol stdlib.h long int atol(const char *string); Converts string to a long integer.

bsearch stdlib.h void *bsearch(const void *key, Performs a binary search on an


const void *base, size_t num, array of num elements, each of
size_t size, int (*compare) (const size bytes. The array must be
void *element1, const void sorted in ascending order by the
*element2)); function pointed to by compare.

btowc stdio.h wint_t btowc(int c); Determines whether c constitues


wchar.h a valid multibyte character in the
initial shift state.
System
Function Include File Function Prototype Description

calloc stdlib.h void *calloc(size_t num, size_t Reserves storage space for an
size); array of num elements, each of
size size, and initializes the values
of all elements to 0.

catclose6 nl_types.h int catclose (nl_catd catd); Closes a previously opened


message catalog.

catgets6 nl_types.h char *catgets(nl_catd catd, int Retrieves a message from an


set_id, int msg_id, const char open message catalog.
*s);

catopen6 nl_types.h nl_catd catopen (const char Opens a message catalog, which
*name, int oflag); must be done before a message
can be retrieved.

ceil math.h double ceil(double x); Calculates the double value


representing the smallest integer
that is greater than or equal to x.

clearerr stdio.h void clearerr(FILE *stream); Resets the error indicators and
the end-of-file indicator for
stream.

clock time.h clock_t clock(void); Returns the processor time that


has elapsed since the job was
started.

cos math.h double cos(double x); Calculates the cosine of x.

cosh math.h double cosh(double x); Calculates the hyperbolic cosine


of x.

ctime time.h char *ctime(const time_t *time); Converts time to a character


string.

ctime64 time.h char *ctime64(const time64_t Converts time to a character


*time); string.

ctime_r time.h char *ctime_r(const time_t Converts time to a character


*time, char *buf); string. (Restartable version of
ctime.)

ctime64_r time.h char *ctime64_r(const time64_t Converts time to a character


*time, char *buf); string. (Restartable version of
System
Function Include File Function Prototype Description

ctime64.)

difftime time.h double difftime(time_t time2, Computes the difference


time_t time1); between time2 and time1.

difftime64 time.h double difftime64(time64_t Computes the difference


time2, time64_t time1); between time2 and time1.

div stdlib.h div_t div(int numerator, int Calculates the quotient and
denominator); remainder of the division of
numerator by denominator.

erf math.h double erf(double x); Calculates the error function of x.

erfc math.h double erfc(double x); Calculates the error function for
large values of x.

exit stdlib.h void exit(int status); Ends a program normally.

exp math.h double exp(double x); Calculates the exponential


function of a floating-point
argument x.

fabs math.h double fabs(double x); Calculates the absolute value of a


floating-point argument x.

fclose stdio.h int fclose(FILE *stream); Closes the specified stream.

fdopen5 stdio.h FILE *fdopen(int handle, const Associates an input or output


char *type); stream with the file identified by
handle.

feof stdio.h int feof(FILE *stream); Tests whether the end-of-file flag
is set for a given stream.

ferror stdio.h int ferror(FILE *stream); Tests for an error indicator in


reading from or writing to
stream.

fflush1 stdio.h int fflush(FILE *stream); Writes the contents of the buffer
associated with the output
stream.

fgetc1 stdio.h int fgetc(FILE *stream); Reads a single unsigned character


from the input stream.
System
Function Include File Function Prototype Description

fgetpos1 stdio.h int fgetpos(FILE *stream, fpos_t Stores the current position of the
*pos); file pointer associated with
stream into the object pointed to
by pos.

fgets1 stdio.h char *fgets(char *string, int n, Reads a string from the input
FILE *stream); stream.

fgetwc6 stdio.h wint_t fgetwc(FILE *stream); Reads the next multibyte


wchar.h character from the input stream
pointed to by stream.

fgetws6 stdio.h wchar_t *fgetws(wchar_t *wcs, Reads wide characters from the
wchar.h int n, FILE *stream); stream into the array pointed to
by wcs.

fileno5 stdio.h int fileno(FILE *stream); Determines the file handle


currently associated with stream.

floor math.h double floor(double x); Calculates the floating-point


value representing the largest
integer less than or equal to x.

fmod math.h double fmod(double x, double Calculates the floating-point


y); remainder of x/y.

fopen stdio.h FILE *fopen(const char Opens the specified file.


*filename, const char *mode);

fprintf stdio.h int fprintf(FILE *stream, const Formats and prints characters
char *format-string, arg-list); and values to the output stream.

fputc1 stdio.h int fputc(int c, FILE *stream); Prints a character to the output
stream.

fputs1 stdio.h int fputs(const char *string, FILE Copies a string to the output
*stream); stream.

fputwc6 stdio.h wint_t fputwc(wchar_t wc, FILE Converts the wide character wc
wchar.h *stream); to a multibyte character and
writes it to the output stream
pointed to by stream at the
current position.

fputws6 stdio.h int fputws(const wchar_t *wcs, Converts the wide-character


string wcs to a multibyte-
System
Function Include File Function Prototype Description

wchar.h FILE *stream); character string and writes it to


stream as a multibyte character
string.

fread stdio.h size_t fread(void *buffer, size_t Reads up to count items of size
size, size_t count, FILE *stream); length from the input stream,
and stores them in buffer.

free stdlib.h void free(void *ptr); Frees a block of storage.

freopen stdio.h FILE *freopen(const char Closes stream, and reassigns it to


*filename, const char *mode, the file specified.
FILE *stream);

frexp math.h double frexp(double x, int Separates a floating-point


*expptr); number into its mantissa and
exponent.

fscanf stdio.h int fscanf(FILE *stream, const Reads data from stream into
char *format-string, arg-list); locations given by arg-list.

fseek1 stdio.h int fseek(FILE *stream, long int Changes the current file position
offset, int origin); associated with stream to a new
location.

fsetpos1 stdio.h int fsetpos(FILE *stream, const Moves the current file position to
fpos_t *pos); a new location determined by
pos.

ftell1 stdio.h long int ftell(FILE *stream); Gets the current position of the
file pointer.

fwide6 stdio.h int fwide(FILE *stream, int Determines the orientation of the
wchar.h mode); stream pointed to by stream.

fwprintf6 stdio.h int fwprintf(FILE *stream, const Writes output to the stream
wchar.h wchar_t *format, arg-list); pointed to by stream.

fwrite stdio.h size_t fwrite(const void *buffer, Writes up to count items of size
size_t size,size_t count, FILE length from buffer to stream.
*stream);

fwscanf6 stdio.h int fwscanf(FILE *stream, const Reads input from the stream
wchar.h wchar_t *format, arg-list) pointed to by stream.
System
Function Include File Function Prototype Description

gamma math.h double gamma(double x); Computes the Gamma Function

getc1 stdio.h int getc(FILE *stream); Reads a single character from the
input stream.

getchar1 stdio.h int getchar(void); Reads a single character from


stdin.

getenv stdlib.h char *getenv(const char Searches environment variables


*varname); for varname.

gets stdio.h char *gets(char *buffer); Reads a string from stdin, and
stores it in buffer.

getwc6 stdio.h wint_t getwc(FILE *stream); Reads the next multibyte


wchar.h character from stream, converts
it to a wide character and
advances the associated file
position indicator for stream.

getwchar6 wchar.h wint_t getwchar(void); Reads the next multibyte


character from stdin, converts it
to a wide character, and
advances the associated file
position indicator for stdin.

gmtime time.h struct tm *gmtime(const time_t Converts a time value to a


*time); structure of type tm.

gmtime64 time.h struct tm *gmtime64(const Converts a time value to a


time64_t *time); structure of type tm.

gmtime_r time.h struct tm *gmtime_r (const Converts a time value to a


time_t *time, struct tm *result); structure of type tm. (Restartable
version of gmtime.)

gmtime64_r time.h struct tm *gmtime64_r (const Converts a time value to a


time64_t *time, struct tm structure of type tm. (Restartable
*result); version of gmtime64.)

hypot math.h double hypot(double side1, Calculates the hypotenuse of a


double side2); right-angled triangle with sides of
length side1 and side2.

isalnum ctype.h int isalnum(int c); Tests if c is alphanumeric.


System
Function Include File Function Prototype Description

isalpha ctype.h int isalpha(int c); Tests if c is alphabetic.

isascii4 ctype.h int isascii(int c); Tests if c is within the 7-bit US-
ASCII range.

isblank ctype.h int isblank(int c); Tests if c is a blank or tab


character.

iscntrl ctype.h int iscntrl(int c); Tests if c is a control character.

isdigit ctype.h int isdigit(int c); Tests if c is a decimal digit.

isgraph ctype.h int isgraph(int c); Tests if c is a printable character


excluding the space.

islower ctype.h int islower(int c); Tests if c is a lowercase letter.

isprint ctype.h int isprint(int c); Tests if c is a printable character


including the space.

ispunct ctype.h int ispunct(int c); Tests if c is a punctuation


character.

isspace ctype.h int isspace(int c); Tests if c is a whitespace


character.

isupper ctype.h int isupper(int c); Tests if c is an uppercase letter.

iswalnum4 wctype.h int iswalnum (wint_t wc); Checks for any alphanumeric
wide character.

iswalpha4 wctype.h int iswalpha (wint_t wc); Checks for any alphabetic wide
character.

iswblank4 wctype.h int iswblank (wint_t wc); Checks for any blank or tab wide
character.

iswcntrl4 wctype.h int iswcntrl (wint_t wc); Tests for any control wide
character.

iswctype4 wctype.h int iswctype(wint_t wc, wctype_t Determines whether or not the
wc_prop); wide character wc has the
property wc_prop.

iswdigit4 wctype.h int iswdigit (wint_t wc); Checks for any decimal-digit wide
character.
System
Function Include File Function Prototype Description

iswgraph4 wctype.h int iswgraph (wint_t wc); Checks for any printing wide
character except for the wide-
character space.

iswlower4 wctype.h int iswlower (wint_t wc); Checks for any lowercase wide
character.

iswprint4 wctype.h int iswprint (wint_t wc); Checks for any printing wide
character.

iswpunct4 wctype.h int iswpunct (wint_t wc); Test for a wide non-
alphanumeric, non-space
character.

iswspace4 wctype.h int iswspace (wint_t wc); Checks for any wide character
that corresponds to an
implementation-defined set of
wide characters for which
iswalnum is false.

iswupper4 wctype.h int iswupper (wint_t wc); Checks for any uppercase wide
character.

iswxdigit4 wctype.h int iswxdigit (wint_t wc); Checks for any hexadecimal digit
character.

isxdigit4 wctype.h int isxdigit(int c); Tests if c is a hexadecimal digit.

j0 math.h double j0(double x); Calculates the Bessel function


value of the first kind of order 0.

j1 math.h double j1(double x); Calculates the Bessel function


value of the first kind of order 1.

jn math.h double jn(int n, double x); Calculates the Bessel function


value of the first kind of order n.

labs stdlib.h long int labs(long int n); Calculates the absolute value of
n.

ldexp math.h double ldexp(double x, int exp); Returns the value of x multiplied
by (2 to the power of exp).

ldiv stdlib.h ldiv_t ldiv(long int numerator, Calculates the quotient and
long int denominator); remainder of
System
Function Include File Function Prototype Description

numerator/denominator.

localeconv locale.h struct lconv *localeconv(void); Formats numeric quantities in


struct lconv according to the
current locale.

localtime time.h struct tm *localtime(const Converts timeval to a structure of


time_t *timeval); type tm.

localtime64 time.h struct tm *localtime64(const Converts timeval to a structure of


time64_t *timeval); type tm.

localtime_r time.h struct tm *localtime_r (const Converts a time value to a


time_t *timeval, struct tm structure of type tm. (Restartable
*result); version of localtime.)

localtime64_r time.h struct tm *localtime64_r (const Converts a time value to a


time64_t *timeval, struct tm structure of type tm. (Restartable
*result); version of localtime64.)

log math.h double log(double x); Calculates the natural logarithm


of x.

log10 math.h double log10(double x); Calculates the base 10 logarithm


of x.

longjmp setjmp.h void longjmp(jmp_buf env, int Restores a stack environment


value); previously set in env by the
setjmp function.

malloc stdlib.h void *malloc(size_t size); Reserves a block of storage.

mblen stdlib.h int mblen(const char *string, Determines the length of a


size_t n); multibyte character string.

mbrlen4 wchar.h int mbrlen (const char *s, size_t Determines the length of a
n, mbstate_t *ps); multibyte character. (Restartable
version of mblen.)

mbrtowc4 wchar.h int mbrtowc (wchar_t *pwc, Convert a multibyte character to


const char *s, size_t n, a wide character (Restartable
mbstate_t *ps); version of mbtowc.)

mbsinit4 wchar.h int mbsinit (const mbstate_t Test state object *ps for initial
*ps); state.
System
Function Include File Function Prototype Description

mbsrtowcs4 wchar.h size_t mbsrtowc (wchar_t *dst, Convert multibyte string to a


const char **src, size_t len, wide character string.
mbstate_t *ps); (Restartable version of
mbstowcs.)

mbstowcs stdlib.h size_t mbstowcs(wchar_t *pwc, Converts the multibyte


const char *string, size_t n); characters in string to their
corresponding wchar_t codes,
and stores not more than n codes
in pwc.

mbtowc stdlib.h int mbtowc(wchar_t *pwc, const Stores the wchar_t code
char *string, size_t n); corresponding to the first n bytes
of multibyte character string into
the wchar_t character pwc.

memchr string.h void *memchr(const void *buf, Searches the first count bytes of
int c, size_t count); buf for the first occurrence of c
converted to an unsigned
character.

memcmp string.h int memcmp(const void *buf1, Compares up to count bytes of


const void *buf2, size_t count); buf1 and buf2.

memcpy string.h void *memcpy(void *dest, const Copies count bytes of src to dest.
void *src, size_t count);

memmove string.h void *memmove(void *dest, Copies count bytes of src to dest.
const void *src, size_t count); Allows copying between objects
that overlap.

memset string.h void *memset(void *dest, int c, Sets count bytes of dest to a
size_t count); value c.

mktime time.h time_t mktime(struct tm *time); Converts local time into calendar
time.

mktime64 time.h time64_t mktime64(struct tm Converts local time into calendar


*time); time.

modf math.h double modf(double x, double Breaks down the floating-point


*intptr); value x into fractional and
integral parts.

nextafter math.h double nextafter(double x, Calculates the next representable


System
Function Include File Function Prototype Description

double y); value after x in the direction of y.

nextafterl math.h long double nextafterl(long Calculates the next representable


double x, long double y); value after x in the direction of y.

nexttoward math.h double nexttoward(double x, Calculates the next representable


long double y); value after x in the direction of y.

nexttowardl math.h long double nexttowardl(long Calculates the next representable


double x, long double y); value after x in the direction of y.

nl_langinfo4 langinfo.h char *nl_langinfo(nl_item item); Retrieve from the current locale
the string that describes the
requested information specified
by item.

perror stdio.h void perror(const char *string); Prints an error message to stderr.

pow math.h double pow(double x, double y); Calculates the value x to the
power y.

printf stdio.h int printf(const char *format- Formats and prints characters
string, arg-list); and values to stdout.

putc1 stdio.h int putc(int c, FILE *stream); Prints c to the output stream.

putchar1 stdio.h int putchar(int c); Prints c to stdout.

putenv stdlib.h int *putenv(const char Sets the value of an environment


*varname); variable by altering an existing
variable or creating a new one.

puts stdio.h int puts(const char *string); Prints a string to stdout.

putwc6 stdio.h wint_t putwchar(wchar_t wc, Converts the wide character wc


wchar.h FILE *stream); to a multibyte character, and
writes it to the stream at the
current position.

putwchar6 wchar.h wint_t putwchar(wchar_t wc); Converts the wide character wc


to a multibyte character and
writes it to stdout.

qsort stdlib.h void qsort(void *base, size_t Performs a quick sort of an array
num, size_t width, of num elements, each of width
int(*compare)(const void bytes in size.
System
Function Include File Function Prototype Description

*element1, const void


*element2));

quantexpd32 math.h _Decimal32 Compute the quantum exponent


quantized32(_Decimal32 x, of a single-precision decimal
_Decimal32 y); floating-point value.

quantexpd64 math.h _Decimal64 Compute the quantum exponent


quantized64(_Decimal64 x, of a double-precision decimal
_Decimal64 y); floating-point value.

quantexpd128 math.h _Decimal128 Compute the quantum exponent


quantized128(_Decimal128 x, of a quad-precision decimal
_Decimal128 y); floating-point value.

quantized32 math.h int quantexpd32(_Decimal32 x); Set the quantum exponent of a


single-precision decimal floating-
point value to the quantum
exponent of another single-
precision decimal floating-point
value.

quantized64 math.h int quantexpd64(_Decimal64 x); Set the quantum exponent of a


double-precision decimal
floating-point value to the
quantum exponent of another
double-precision decimal
floating-point value.

quantized128 math.h int quantexpd128(_Decimal128 Set the quantum exponent of a


x); quad-precision decimal floating-
point value to the quantum
exponent of another quad-
precision decimal floating-point
value.

samequantumd32 math.h __bool__ Determine if the quantum


samequantumd32(_Decimal32 x, exponents of two single-precision
_Decimal32 y); decimal floating-point values are
the same.

samequantumd64 math.h __bool__ Determine if the quantum


samequantumd64(_Decimal64 x, exponents of two double-
_Decimal64 y); precision decimal floating-point
System
Function Include File Function Prototype Description

values are the same.

samequantumd128 math.h __bool__ Determine if the quantum


samequantumd128(_Decimal128 exponents of two quad-precision
x, _Decimal128 y); decimal floating-point values are
the same.

raise signal.h int raise(int sig); Sends the signal sig to the
running program.

rand stdlib.h int rand(void); Returns a pseudo-random


integer.

rand_r stdlib.h int rand_r(void); Returns a pseudo-random


integer. (Restartable version)

realloc stdlib.h void *realloc(void *ptr, size_t Changes the size of a previously
size); reserved storage block.

regcomp regex.h int regcomp(regex_t *preg, Compiles the source regular


const char *pattern, int cflags); expression pointed to by pattern
into an executable version and
stores it in the location pointed
to by preg.

regerror regex.h size_t regerror(int errcode, const Finds the description for the error
regex_t *preg, char *errbuf, code errcode for the regular
size_t errbuf_size); expression preg.

regexec regex.h int regexec(const regex_t *preg, Compares the null-ended string
const char *string, size_t string against the compiled
nmatch, regmatch_t *pmatch, regular expression preg to find a
int eflags); match between the two.

regfree regex.h void regfree(regex_t *preg); Frees any memory that was
allocated by regcomp to
implement the regular expression
preg.

remove stdio.h int remove(const char Deletes the file specified by


*filename); filename.

rename stdio.h int rename(const char Renames the specified file.


*oldname, const char
*newname);
System
Function Include File Function Prototype Description

rewind1 stdio.h void rewind(FILE *stream); Repositions the file pointer


associated with stream to the
beginning of the file.

scanf stdio.h int scanf(const char *format- Reads data from stdin into
string, arg-list); locations given by arg-list.

setbuf stdio.h void setbuf(FILE *stream, char Controls buffering for stream.
*buffer);

setjmp setjmp.h int setjmp(jmp_buf env); Saves a stack environment that


can be subsequently restored by
longjmp.

setlocale locale.h char *setlocale(int category, Changes or queries variables


const char *locale); defined in the locale.

setvbuf stdio.h int setvbuf(FILE *stream, char Controls buffering and buffer size
*buf, int type, size_t size); for stream.

signal signal.h void(*signal (int sig, Registers func as a signal handler


void(*func)(int))) (int); for the signal sig.

sin math.h double sin(double x); Calculates the sine of x.

sinh math.h double sinh(double x); Calculates the hyperbolic sine of


x.

snprintf stdio.h int snprintf(char *outbuf, size_t Same as sprintf except that the
n, const char*, ...) function will stop after n
characters have been written to
outbuf.

sprintf stdio.h int sprintf(char *buffer, const Formats and stores characters
char *format-string, arg-list); and values in buffer.

sqrt math.h double sqrt(double x); Calculates the square root of x.

srand stdlib.h void srand(unsigned int seed); Sets the seed for the pseudo-
random number generator.

sscanf stdio.h int sscanf(const char *buffer, Reads data from buffer into the
const char *format, arg-list); locations given by arg-list.

strcasecmp strings.h int srtcasecmp(const char Compares strings without case


*string1, const char *string2); sensitivity.
System
Function Include File Function Prototype Description

strcat string.h char *strcat(char *string1, const Concatenates string2 to string1.


char *string2);

strchr string.h char *strchr(const char *string, Locates the first occurrence of c
int c); in string.

strcmp string.h int strcmp(const char *string1, Compares the value of string1 to
const char *string2); string2.

strcoll string.h int strcoll(const char *string1, Compares two strings using the
const char *string2); collating sequence in the current
locale.

strcpy string.h char *strcpy(char *string1, const Copies string2 into string1.
char *string2);

strcspn string.h size_t strcspn(const char Returns the length of the initial
*string1, const char *string2); substring of string1 consisting of
characters not contained in
string2.

strerror string.h char *strerror(int errnum); Maps the error number in


errnum to an error message
string.

strfmon4 wchar.h int strfmon (char *s, size_t Converts monetary value to
maxsize, const char *format, ...); string.

strftime time.h size_t strftime (char *dest, size_t Stores characters in an array
maxsize, const char *format, pointed to by dest, according to
const struct tm *timeptr); the string determined by format.

strlen string.h size_t strlen(const char *string); Calculates the length of string.

strncasecmp strings.h int strncasecmp(const char Compares strings without case


*string1, const char *string2, sensitivity.
size_t count);

strncat string.h char *strncat(char *string1, Concatenates up to count


const char *string2, size_t characters of string2 to string1.
count);

strncmp string.h int strncmp(const char *string1, Compares up to count characters


const char *string2, size_t of string1 and string2.
count);
System
Function Include File Function Prototype Description

strncpy string.h char *strncpy(char *string1, Copies up to count characters of


const char *string2, size_t string2 to string1.
count);

strpbrk string.h char *strpbrk(const char Locates the first occurrence in


*string1, const char *string2); string1 of any character in
string2.

strptime4 time.h char *strptime (const char *buf, Date and time conversion
const char *format, struct tm
*tm);

strrchr string.h char *strrchr(const char *string, Locates the last occurrence of c in
int c); string.

strspn string.h size_t strspn(const char *string1, Returns the length of the initial
const char *string2); substring of string1 consisting of
characters contained in string2.

strstr string.h char *strstr(const char *string1, Returns a pointer to the first
const char *string2); occurrence of string2 in string1.

strtod stdlib.h double strtod(const char *nptr, Converts nptr to a double


char **endptr); precision value.

strtod32 stdlib.h _Decimal32 strtod32(const char Converts nptr to a single-


*nptr, char **endptr); precision decimal floating-point
value.

strtod64 stdlib.h _Decimal64 strtod64(const char Converts nptr to a double-


*nptr, char **endptr); precision decimal floating-point
value.

strtod128 stdlib.h _Decimal128 strtod128(const Converts nptr to a quad-precision


char *nptr, char **endptr); decimal floating-point value.

strtof stdlib.h float strtof(const char *nptr, Converts nptr to a float value.
char **endptr);

strtok string.h char *strtok(char *string1, const Locates the next token in string1
char *string2); delimited by the next character in
string2.

strtok_r string.h char *strtok_r(char *string, const Locates the next token in string
char *seps, char **lasts); delimited by the next character in
seps. (Restartable version of
System
Function Include File Function Prototype Description

strtok.)

strtol stdlib.h long int strtol(const char *nptr, Converts nptr to a signed long
char **endptr, int base); integer.

strtold stdlib.h long double strtold(const char Converts nptr to a long double
*nptr, char **endptr); value.

strtoul stdlib.h unsigned long int strtoul(const Converts string1 to an unsigned


char *string1, char **string2, int long integer.
base);

strxfrm string.h size_t strxfrm(char *string1, Converts string2 and places the
const char *string2, size_t result in string1. The conversion
count); is determined by the program's
current locale.

swprintf wchar.h int swprintf(wchar_t *wcsbuffer, Formats and stores a series of


size_t n, const wchar_t *format, wide characters and values into
arg-list); the wide-character buffer
wcsbuffer.

swscanf wchar.h int swscanf (const wchar_t Reads data from buffer into the
*buffer, const wchar_t *format, locations given by arg-list.
arg-list)

system stdlib.h int system(const char *string); Passes string to the system
command analyzer.

tan math.h double tan(double x); Calculates the tangent of x.

tanh math.h double tanh(double x); Calculates the hyperbolic tangent


of x.

time time.h time_t time(time_t *timeptr); Returns the current calendar


time.

time64 time.h time64_t time64(time64_t Returns the current calendar


*timeptr); time.

tmpfile stdio.h FILE *tmpfile(void); Creates a temporary binary file


and opens it.

tmpnam stdio.h char *tmpnam(char *string); Generates a temporary file name.

toascii ctype.h int toascii(int c); Converts c to a character in the 7-


System
Function Include File Function Prototype Description

bit US-ASCII character set.

tolower ctype.h int tolower(int c); Converts c to lowercase.

toupper ctype.h int toupper(int c); Converts c to uppercase.

towctrans wctype.h wint_t towctrans(wint_t wc, Translates the wide character wc


wctrans_t desc); based on the mapping described
by desc.

towlower4 wctype.h wint_t towlower (wint_t wc); Converts uppercase letter to


lowercase letter.

towupper4 wctype.h wint_t towupper (wint_t wc); Converts lowercase letter to


uppercase letter.

ungetc1 stdio.h int ungetc(int c, FILE *stream); Pushes c back onto the input
stream.

ungetwc6 stdio.h wint_t ungetwc(wint_t wc, FILE Pushes the wide character wc
wchar.h *stream); back onto the input stream.

va_arg stdarg.h var_type va_arg(va_list arg_ptr, Returns the value of one


var_type); argument and modifies arg_ptr to
point to the next argument.

va_copy stdarg.h void va_copy(va_list dest, va_list Initializes dest as a copy of src.
src);

va_end stdarg.h void va_end(va_list arg_ptr); Facilitates normal return from


variable argument list processing.

va_start stdarg.h void va_start(va_list arg_ptr, Initializes arg_ptr for subsequent


variable_name); use by va_arg and va_end.

vfprintf stdio.h int vfprintf(FILE *stream, const Formats and prints characters to
stdarg.h char *format, va_list arg_ptr); the output stream using a
variable number of arguments.

vfscanf stdio.h int vfscanf(FILE *stream, const Reads data from a specified
stdarg.h char *format, va_list arg_ptr); stream into locations given by a
variable number of arguments.

vfwprintf6 stdarg.h int vfwprintf(FILE *stream, const Equivalent to fwprintf, except


stdio.h wchar_t *format, va_list arg); that the variable argument list is
wchar.h replaced by arg.
System
Function Include File Function Prototype Description

vfwscanf stdio.h int vfwscanf(FILE *stream, const Reads wide data from a specified
stdarg.h wchar_t *format, va_list stream into locations given by a
arg_ptr); variable number of arguments.

vprintf stdio.h int vprintf(const char *format, Formats and prints characters to
stdarg.h va_list arg_ptr); stdout using a variable number of
arguments.

vscanf stdio.h int vscanf(const char *format, Reads data from stdin into
stdarg.h va_list arg_ptr); locations given by a variable
number of arguments.

vsprintf stdio.h int vsprintf(char *target-string, Formats and stores characters in


stdarg.h const char *format, va_list a buffer using a variable number
arg_ptr); of arguments.

vsnprintf stdio.h int vsnprintf(char *outbuf, size_t Same as vsprintf except that the
n, const char*, va_list); function will stop after n
characters have been written to
outbuf.

vsscanf stdio.h int vsscanf(const char*buffer, Reads data from a buffer into
stdarg.h const char *format, va_list locations given by a variable
arg_ptr); number of arguments.

vswprintf stdarg.h int vswprintf(wchar_t Formats and stores a series of


wchar.h *wcsbuffer, size_t n, const wide characters and values in the
wchar_t *format, va_list arg); buffer wcsbuffer.

vswscanf stdio.h int vswscanf(const wchar_t Reads wide data from a buffer
wchar.h *buffer, const wchar_t *format, into locations given by a variable
va_list arg_ptr); number of arguments.

vwprintf6 stdarg.h int vwprintf(const wchar_t Equivalent to wprintf, except that


wchar.h *format, va_list arg); the variable argument list is
replaced by arg.

vwscanf stdio.h int vwscanf(const wchar_t Reads wide data from stdin into
wchar.h *format, va_list arg_ptr); locations given by a variable
number of arguments.

wcrtomb4 wchar.h int wcrtomb (char *s, wchar_t Converts a wide character to a
wchar, mbstate_t *pss); multibyte character. (Restartable
version of wctomb.)
System
Function Include File Function Prototype Description

wcscat wchar.h wchar_t *wcscat(wchar_t Appends a copy of the string


*string1, const wchar_t pointed to by string2 to the end
*string2); of the string pointed to by
string1.

wcschr wchar.h wchar_t *wcschr(const wchar_t Searches the wide-character


*string, wchar_t character); string pointed to by string for the
occurrence of character.

wcscmp wchar.h int wcscmp(const wchar_t Compares two wide-character


*string1, const wchar_t strings, *string1 and *string2.
*string2);

wcscoll4 wchar.h int wcscoll (const wchar_t Compares two wide-character


*wcs1, const wchar_t *wcs2); strings using the collating
sequence in the current locale.

wcscpy wchar.h wchar_t *wcscpy(wchar_t Copies the contents of *string2


*string1, const wchar_t (including the ending wchar_t
*string2); null character) into *string1.

wcscspn wchar.h size_t wcscspn(const wchar_t Determines the number of


*string1, const wchar_t wchar_t characters in the initial
*string2); segment of the string pointed to
by *string1 that do not appear in
the string pointed to by *string2.

wcsftime wchar.h size_t wcsftime(wchar_t *wdest, Converts the time and date
size_t maxsize, const wchar_t specification in the timeptr
*format, const struct tm structure into a wide-character
*timeptr); string.

wcslen wchar.h size_t wcslen(const wchar_t Computes the number of wide-


*string); characters in the string pointed
to by string.

wcslocaleconv locale.h struct wcslconv Formats numeric quantities in


*wcslocaleconv(void); struct wcslconv according to the
current locale.

wcsncat wchar.h wchar_t *wcsncat(wchar_t Appends up to count wide


*string1, const wchar_t *string2, characters from string2 to the
size_t count); end of string1, and appends a
wchar_t null character to the
System
Function Include File Function Prototype Description

result.

wcsncmp wchar.h int wcsncmp(const wchar_t Compares up to count wide


*string1, const wchar_t *string2, characters in string1 to string2.
size_t count);

wcsncpy wchar.h wchar_t *wcsncpy(wchar_t Copies up to count wide


*string1, const wchar_t *string2, characters from string2 to
size_t count); string1.

wcspbrk wchar.h wchar_t *wcspbrk(const wchar_t Locates the first occurrence in


*string1, const wchar_t the string pointed to by string1 of
*string2); any wide characters from the
string pointed to by string2.

wcsptime wchar.h wchar_t *wcsptime ( const Date and time conversion.


wchar_t *buf, const wchar_t Equivalent to strptime(), except
*format, struct tm *tm ); that it uses wide characters.

wcsrchr wchar.h wchar_t *wcsrchr(const wchar_t Locates the last occurrence of


*string, wchar_t character); character in the string pointed to
by string.

wcsrtombs4 wchar.h size_t wcsrtombs (char *dst, Converts wide character string to
const wchar_t **src, size_t len, multibyte string. (Restartable
mbstate_t *ps); version of wcstombs.)

wcsspn wchar.h size_t wcsspn(const wchar_t Computes the number of wide


*string1, const wchar_t characters in the initial segment
*string2); of the string pointed to by
string1, which consists entirely of
wide characters from the string
pointed to by string2.

wcsstr wchar.h wchar_t *wcsstr(const wchar_t Locates the first occurrence of


*wcs1, const wchar_t *wcs2); wcs2 in wcs1.

wcstod wchar.h double wcstod(const wchar_t Converts the initial portion of the
*nptr, wchar_t **endptr); wide-character string pointed to
by nptr to a double value.

wcstod32 wchar.h _Decimal32 wcstod32(const Converts the initial portion of the


wchar_t *nptr, wchar_t wide-character string pointed to
**endptr); by nptr to a single-precision
System
Function Include File Function Prototype Description

decimal floating-point value.

wcstod64 wchar.h _Decimal64 wcstod64(const Converts the initial portion of the


wchar_t *nptr, wchar_t wide-character string pointed to
**endptr); by nptr to a double-precision
decimal floating-point value.

wcstod128 wchar.h _Decimal128 wcstod128(const Converts the initial portion of the


wchar_t *nptr, wchar_t wide-character string pointed to
**endptr); by nptr to a quad-precision
decimal floating-point value.

wcstof wchar.h float wcstof(const wchar_t Converts the initial portion of the
*nptr, wchar_t **endptr); wide-character string pointed to
by nptr to a float value.

wcstok wchar.h wchar_t *wcstok(wchar_t Breaks wcs1 into a sequence of


*wcs1, const wchar_t *wcs2, tokens, each of which is delimited
wchar_t **ptr) by a wide character from the
wide string pointed to by wcs2.

wcstol wchar.h long int wcstol(const wchar_t Converts the initial portion of the
*nptr, wchar_t **endptr, int wide-character string pointed to
base); by nptr to a long integer value.

wcstold wchar.h long double wcstold(const Converts the initial portion of the
wchar_t *nptr, wchar_t wide-character string pointed to
**endptr); by nptr to a long double value.

wcstombs stdlib.h size_t wcstombs(char *dest, Converts the wchar_t string into
const wchar_t *string, size_t a multibyte string dest.
count);

wcstoul wchar.h unsigned long int wcstoul(const Converts the initial portion of the
wchar_t *nptr, wchar_t wide-character string pointed to
**endptr, int base); by nptr to an unsigned long
integer value.

wcsxfrm4 wchar.h size_t wcsxfrm (wchar_t *wcs1, Transforms a wide-character


const wchar_t *wcs2, size_t n); string to values which represent
character collating weights and
places the resulting wide-
character string into an array.
System
Function Include File Function Prototype Description

wctob stdarg.h int wctob(wint_t wc); Determines whether wc


wchar.h corresponds to a member of the
extended character set whose
multibyte character
representation is a single byte
when in the initial shift state.

wctomb stdlib.h int wctomb(char *string, Converts the wchar_t value of


wchar_t character); character into a multibyte string.

wctrans wctype.h wctrans_t wctrans(const char Constructs a value with type


*property); wctrans_t that describes a
mapping between wide
characters identified by the string
argument property.

wctype4 wchar.h wctype_t wctype (const char Obtains handle for character
*property); property classification.

wcwidth wchar.h int wcswidth(const wchar_t Determine the display width of a


*pwcs, size_t n); wide character string.

wmemchr wchar.h wchar_t *wmemchr(const Locates the first occurrence of c


wchar_t *s, wchar_t c, size_t n); in the initial n wide characters of
the object pointed to by s.

wmemcmp wchar.h int wmemcmp(const wchar_t Compares the first n wide


*s1, const wchar_t *s2, size_t n); characters of the object pointed
to by s1 to the first n characters
of the object pointed to by s2.

wmemcpy wchar.h wchar_t *wmemcpy(wchar_t Copies n wide characters from


*s1, const wchar_t *s2, size_t n); the object pointed to by s2 to the
object pointed to by s1.

wmemmove wchar.h wchar_t *wmemmove(wchar_t Copies n wide characters from


*s1, const wchar_t *s2, size_t n); the object pointed to by s2 to the
object pointed to by s1.

wmemset wchar.h wchar_t *wmemset(wchar_t *s, Copies the value of c into each of
wchar_t c, size_t n); the first n wide characters of the
object pointed to by s.

wprintf6 wchar.h int wprintf(const wchar_t Equivalent to fwprintf with the


argument stdout interposed
System
Function Include File Function Prototype Description

*format, arg-list); before the arguments to wprintf.

wscanf6 wchar.h int wscanf(const wchar_t Equivalent to fwscanf with the


*format, arg-list); argument stdin interposed before
the arguments of wscanf.

y0 math.h double y0(double x); Calculates the Bessel function


value of the second kind of order
0.

y1 math.h double y1(double x); Calculates the Bessel function


value of the second kind of order
1.

yn math.h double yn(int n, double x); Calculates the Bessel function


value of the second kind of order
n.

You might also like