This document provides information about standard C library functions including their function, include file, function prototype, and brief description. It lists over 50 common functions such as abort(), abs(), atoi(), printf(), free(), malloc(), and more. The functions cover mathematical operations, input/output, memory management, time, string conversion and more.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
10 views
C Function
This document provides information about standard C library functions including their function, include file, function prototype, and brief description. It lists over 50 common functions such as abort(), abs(), atoi(), printf(), free(), malloc(), and more. The functions cover mathematical operations, input/output, memory management, time, string conversion and more.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21
System
Function Include Function Prototype Description
File abort stdlib.h void abort(void); Stops a program abnormally. Calculates the absolute value abs stdlib.h int abs(int n); of an integer argument n. Calculates the arc cosine of acos math.h double acos(double x); x. Converts the time that is char *asctime(const struct tm asctime time.h stored as a structure to a *time); character string. Converts tm that is stored as char *asctime_r (const struct tm a structure to a character asctime_r time.h *tm, char *buf); string. (Restartable version of asctime.) asin math.h double asin(double x); Calculates the arc sine of x. Prints a diagnostic message assert assert.h void assert(int expression); and ends the program if the expression is false. Calculates the arc tangent of atan math.h double atan(double x); x. Calculates the arc tangent of atan2 math.h double atan2(double y, double x); y/x. Registers a function to be atexit stdlib.h int atexit(void (*func)(void)); called at normal termination. Converts string to a double- atof stdlib.h double atof(const char *string); precision floating-point value. atoi stdlib.h int atoi(const char *string); Converts string to an integer. Converts string to a long atol stdlib.h long int atol(const char *string); integer. Performs a binary search on void *bsearch(const void *key, an array of num elements, const void *base, size_t num, size_t each of size bytes. The array bsearch stdlib.h size, int (*compare) (const void must be sorted in ascending *element1, const void *element2)); order by the function pointed to by compare. Determines whether c stdio.h constitues a valid multibyte btowc wint_t btowc(int c); wchar.h character in the initial shift state. calloc stdlib.h void *calloc(size_t num, size_t Reserves storage space for size); an array of num elements, each of size size, and initializes the values of all System Function Include Function Prototype Description File elements to 0. Closes a previously opened catclose6 nl_types.h int catclose (nl_catd catd); message catalog. char *catgets(nl_catd catd, int Retrieves a message from an catgets6 nl_types.h set_id, int msg_id, const char *s); open message catalog. Opens a message catalog, nl_catd catopen (const char *name, catopen6 nl_types.h which must be done before a int oflag); message can be retrieved. Calculates the double value representing the smallest ceil math.h double ceil(double x); integer that is greater than or equal to x. Resets the error indicators clearerr stdio.h void clearerr(FILE *stream); and the end-of-file indicator for stream. Returns the processor time clock time.h clock_t clock(void); that has elapsed since the job was started. cos math.h double cos(double x); Calculates the cosine of x. Calculates the hyperbolic cosh math.h double cosh(double x); cosine of x. Converts time to a character ctime time.h char *ctime(const time_t *time); string. char *ctime64(const time64_t Converts time to a character ctime64 time.h *time); string. Converts time to a character char *ctime_r(const time_t *time, ctime_r time.h string. (Restartable version char *buf); of ctime.) Converts time to a character char *ctime64_r(const time64_t ctime64_r time.h string. (Restartable version *time, char *buf); of ctime64.) double difftime(time_t time2, Computes the difference difftime time.h time_t time1); between time2 and time1. double difftime64(time64_t time2, Computes the difference difftime64 time.h time64_t time1); between time2 and time1. Calculates the quotient and div_t div(int numerator, int div stdlib.h remainder of the division of denominator); numerator by denominator. Calculates the error function erf math.h double erf(double x); of x. erfc math.h double erfc(double x); Calculates the error function System Function Include Function Prototype Description File for large values of x. exit stdlib.h void exit(int status); Ends a program normally. Calculates the exponential exp math.h double exp(double x); function of a floating-point argument x. Calculates the absolute value fabs math.h double fabs(double x); of a floating-point argument x. fclose stdio.h int fclose(FILE *stream); Closes the specified stream. Associates an input or output FILE *fdopen(int handle, const char fdopen5 stdio.h stream with the file *type); identified by handle. Tests whether the end-of-file feof stdio.h int feof(FILE *stream); flag is set for a given stream. Tests for an error indicator in ferror stdio.h int ferror(FILE *stream); reading from or writing to stream. Writes the contents of the fflush1 stdio.h int fflush(FILE *stream); buffer associated with the output stream. Reads a single unsigned fgetc1 stdio.h int fgetc(FILE *stream); character from the input stream. Stores the current position of int fgetpos(FILE *stream, fpos_t the file pointer associated fgetpos1 stdio.h *pos); with stream into the object pointed to by pos. char *fgets(char *string, int n, FILE Reads a string from the input fgets1 stdio.h *stream); stream. Reads the next multibyte stdio.h fgetwc6 wint_t fgetwc(FILE *stream); character from the input wchar.h stream pointed to by stream. Reads wide characters from stdio.h wchar_t *fgetws(wchar_t *wcs, int fgetws6 the stream into the array wchar.h n, FILE *stream); pointed to by wcs. Determines the file handle fileno5 stdio.h int fileno(FILE *stream); currently associated with stream. Calculates the floating-point value representing the largest floor math.h double floor(double x); integer less than or equal to x. System Function Include Function Prototype Description File Calculates the floating-point fmod math.h double fmod(double x, double y); remainder of x/y. FILE *fopen(const char *filename, fopen stdio.h Opens the specified file. const char *mode); Formats and prints int fprintf(FILE *stream, const char fprintf stdio.h characters and values to the *format-string, arg-list); output stream. Prints a character to the fputc1 stdio.h int fputc(int c, FILE *stream); output stream. int fputs(const char *string, FILE Copies a string to the output fputs1 stdio.h *stream); stream. Converts the wide character wc to a multibyte character stdio.h wint_t fputwc(wchar_t wc, FILE fputwc6 and writes it to the output wchar.h *stream); stream pointed to by stream at the current position. Converts the wide-character string wcs to a multibyte- stdio.h int fputws(const wchar_t *wcs, fputws6 character string and writes it wchar.h FILE *stream); to stream as a multibyte character string. Reads up to count items of size_t fread(void *buffer, size_t size length from the input fread stdio.h size, size_t count, FILE *stream); stream, and stores them in buffer. free stdlib.h void free(void *ptr); Frees a block of storage. FILE *freopen(const char Closes stream, and reassigns freopen stdio.h *filename, const char *mode, FILE it to the file specified. *stream); Separates a floating-point frexp math.h double frexp(double x, int *expptr); number into its mantissa and exponent. int fscanf(FILE *stream, const char Reads data from stream into fscanf stdio.h *format-string, arg-list); locations given by arg-list. Changes the current file int fseek(FILE *stream, long int fseek1 stdio.h position associated with offset, int origin); stream to a new location. Moves the current file int fsetpos(FILE *stream, const fsetpos1 stdio.h position to a new location fpos_t *pos); determined by pos. Gets the current position of ftell1 stdio.h long int ftell(FILE *stream); the file pointer. System Function Include Function Prototype Description File Determines the orientation of 6 stdio.h fwide int fwide(FILE *stream, int mode); the stream pointed to by wchar.h stream. stdio.h int fwprintf(FILE *stream, const Writes output to the stream fwprintf6 wchar.h wchar_t *format, arg-list); pointed to by stream. size_t fwrite(const void *buffer, Writes up to count items of fwrite stdio.h size_t size,size_t count, FILE size length from buffer to *stream); stream. stdio.h int fwscanf(FILE *stream, const Reads input from the stream fwscanf6 wchar.h wchar_t *format, arg-list) pointed to by stream. Computes the Gamma gamma math.h double gamma(double x); Function Reads a single character getc1 stdio.h int getc(FILE *stream); from the input stream. Reads a single character getchar1 stdio.h int getchar(void); from stdin. Searches environment getenv stdlib.h char *getenv(const char *varname); variables for varname. Reads a string from stdin, gets stdio.h char *gets(char *buffer); and stores it in buffer. Reads the next multibyte character from stream, stdio.h converts it to a wide getwc6 wint_t getwc(FILE *stream); wchar.h character and advances the associated file position indicator for stream. Reads the next multibyte character from stdin, converts it to a wide getwchar6 wchar.h wint_t getwchar(void); character, and advances the associated file position indicator for stdin. struct tm *gmtime(const time_t Converts a time value to a gmtime time.h *time); structure of type tm. struct tm *gmtime64(const Converts a time value to a gmtime64 time.h time64_t *time); structure of type tm. Converts a time value to a struct tm *gmtime_r (const time_t structure of type tm. gmtime_r time.h *time, struct tm *result); (Restartable version of gmtime.) gmtime64_r time.h struct tm *gmtime64_r (const Converts a time value to a time64_t *time, struct tm *result); structure of type tm. System Function Include Function Prototype Description File (Restartable version of gmtime64.) Calculates the hypotenuse of double hypot(double side1, double a right-angled triangle with hypot math.h side2); sides of length side1 and side2. isalnum ctype.h int isalnum(int c); Tests if c is alphanumeric. isalpha ctype.h int isalpha(int c); Tests if c is alphabetic. Tests if c is within the 7-bit isascii4 ctype.h int isascii(int c); US-ASCII range. Tests if c is a blank or tab isblank ctype.h int isblank(int c); character. Tests if c is a control iscntrl ctype.h int iscntrl(int c); character. isdigit ctype.h int isdigit(int c); Tests if c is a decimal digit. Tests if c is a printable isgraph ctype.h int isgraph(int c); character excluding the space. Tests if c is a lowercase islower ctype.h int islower(int c); letter. Tests if c is a printable isprint ctype.h int isprint(int c); character including the space. Tests if c is a punctuation ispunct ctype.h int ispunct(int c); character. Tests if c is a whitespace isspace ctype.h int isspace(int c); character. Tests if c is an uppercase isupper ctype.h int isupper(int c); letter. Checks for any alphanumeric iswalnum4 wctype.h int iswalnum (wint_t wc); wide character. Checks for any alphabetic iswalpha4 wctype.h int iswalpha (wint_t wc); wide character. Checks for any blank or tab iswblank4 wctype.h int iswblank (wint_t wc); wide character. Tests for any control wide iswcntrl4 wctype.h int iswcntrl (wint_t wc); character. Determines whether or not int iswctype(wint_t wc, wctype_t iswctype4 wctype.h the wide character wc has the wc_prop); property wc_prop. iswdigit4 wctype.h int iswdigit (wint_t wc); Checks for any decimal-digit System Function Include Function Prototype Description File wide character. Checks for any printing wide iswgraph4 wctype.h int iswgraph (wint_t wc); character except for the wide-character space. Checks for any lowercase iswlower4 wctype.h int iswlower (wint_t wc); wide character. Checks for any printing wide iswprint4 wctype.h int iswprint (wint_t wc); character. Test for a wide non- iswpunct4 wctype.h int iswpunct (wint_t wc); alphanumeric, non-space character. Checks for any wide character that corresponds to iswspace4 wctype.h int iswspace (wint_t wc); an implementation-defined set of wide characters for which iswalnum is false. Checks for any uppercase iswupper4 wctype.h int iswupper (wint_t wc); wide character. Checks for any hexadecimal iswxdigit4 wctype.h int iswxdigit (wint_t wc); digit character. Tests if c is a hexadecimal isxdigit4 wctype.h int isxdigit(int c); digit. Calculates the Bessel j0 math.h double j0(double x); function value of the first kind of order 0. Calculates the Bessel j1 math.h double j1(double x); function value of the first kind of order 1. Calculates the Bessel jn math.h double jn(int n, double x); function value of the first kind of order n. Calculates the absolute value labs stdlib.h long int labs(long int n); of n. Returns the value of x ldexp math.h double ldexp(double x, int exp); multiplied by (2 to the power of exp). Calculates the quotient and ldiv_t ldiv(long int numerator, long ldiv stdlib.h remainder of int denominator); numerator/denominator. Formats numeric quantities localeconv locale.h struct lconv *localeconv(void); in struct lconv according to the current locale. System Function Include Function Prototype Description File struct tm *localtime(const time_t Converts timeval to a localtime time.h *timeval); structure of type tm. struct tm *localtime64(const Converts timeval to a localtime64 time.h time64_t *timeval); structure of type tm. Converts a time value to a struct tm *localtime_r (const time_t structure of type tm. localtime_r time.h *timeval, struct tm *result); (Restartable version of localtime.) Converts a time value to a struct tm *localtime64_r (const structure of type tm. localtime64_r time.h time64_t *timeval, struct tm (Restartable version of *result); localtime64.) Calculates the natural log math.h double log(double x); logarithm of x. Calculates the base 10 log10 math.h double log10(double x); logarithm of x. Restores a stack environment void longjmp(jmp_buf env, int longjmp setjmp.h previously set in env by the value); setjmp function. malloc stdlib.h void *malloc(size_t size); Reserves a block of storage. int mblen(const char *string, size_t Determines the length of a mblen stdlib.h n); multibyte character string. Determines the length of a int mbrlen (const char *s, size_t n, multibyte character. mbrlen4 wchar.h mbstate_t *ps); (Restartable version of mblen.) Convert a multibyte int mbrtowc (wchar_t *pwc, const character to a wide character mbrtowc4 wchar.h char *s, size_t n, mbstate_t *ps); (Restartable version of mbtowc.) Test state object *ps for mbsinit4 wchar.h int mbsinit (const mbstate_t *ps); initial state. Convert multibyte string to a size_t mbsrtowc (wchar_t *dst, wide character string. mbsrtowcs4 wchar.h const char **src, size_t len, (Restartable version of mbstate_t *ps); mbstowcs.) Converts the multibyte characters in string to their size_t mbstowcs(wchar_t *pwc, mbstowcs stdlib.h corresponding wchar_t const char *string, size_t n); codes, and stores not more than n codes in pwc. mbtowc stdlib.h int mbtowc(wchar_t *pwc, const Stores the wchar_t code System Function Include Function Prototype Description File corresponding to the first n bytes of multibyte character char *string, size_t n); string into the wchar_t character pwc. Searches the first count bytes void *memchr(const void *buf, int of buf for the first occurrence memchr string.h c, size_t count); of c converted to an unsigned character. int memcmp(const void *buf1, Compares up to count bytes memcmp string.h const void *buf2, size_t count); of buf1 and buf2. void *memcpy(void *dest, const Copies count bytes of src to memcpy string.h void *src, size_t count); dest. Copies count bytes of src to void *memmove(void *dest, const memmove string.h dest. Allows copying void *src, size_t count); between objects that overlap. void *memset(void *dest, int c, Sets count bytes of dest to a memset string.h size_t count); value c. Converts local time into mktime time.h time_t mktime(struct tm *time); calendar time. time64_t mktime64(struct tm Converts local time into mktime64 time.h *time); calendar time. Breaks down the floating- double modf(double x, double modf math.h point value x into fractional *intptr); and integral parts. Calculates the next double nextafter(double x, double nextafter math.h representable value after x in y); the direction of y. Calculates the next long double nextafterl(long double nextafterl math.h representable value after x in x, long double y); the direction of y. Calculates the next double nexttoward(double x, long nexttoward math.h representable value after x in double y); the direction of y. Calculates the next long double nexttowardl(long nexttowardl math.h representable value after x in double x, long double y); the direction of y. Retrieve from the current locale the string that nl_langinfo4 langinfo.h char *nl_langinfo(nl_item item); describes the requested information specified by item. perror stdio.h void perror(const char *string); Prints an error message to System Function Include Function Prototype Description File stderr. Calculates the value x to the pow math.h double pow(double x, double y); power y. Formats and prints int printf(const char *format-string, printf stdio.h characters and values to arg-list); 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. Sets the value of an environment variable by putenv stdlib.h int *putenv(const char *varname); altering an existing variable or creating a new one. puts stdio.h int puts(const char *string); Prints a string to stdout. Converts the wide character stdio.h wint_t putwchar(wchar_t wc, FILE wc to a multibyte character, putwc6 wchar.h *stream); and writes it to the stream at the current position. Converts the wide character putwchar6 wchar.h wint_t putwchar(wchar_t wc); wc to a multibyte character and writes it to stdout. void qsort(void *base, size_t num, Performs a quick sort of an size_t width, int(*compare)(const qsort stdlib.h array of num elements, each void *element1, const void of width bytes in size. *element2)); Compute the quantum _Decimal32 exponent of a single- quantexpd32 math.h quantized32(_Decimal32 x, precision decimal floating- _Decimal32 y); point value. Compute the quantum _Decimal64 exponent of a double- quantexpd64 math.h quantized64(_Decimal64 x, precision decimal floating- _Decimal64 y); point value. _Decimal128 Compute the quantum quantexpd128 math.h quantized128(_Decimal128 x, exponent of a quad-precision _Decimal128 y); decimal floating-point value. Set the quantum exponent of a single-precision decimal floating-point value to the quantized32 math.h int quantexpd32(_Decimal32 x); quantum exponent of another single-precision decimal floating-point value. quantized64 math.h int quantexpd64(_Decimal64 x); Set the quantum exponent of System Function Include Function Prototype Description File a double-precision decimal floating-point value to the quantum exponent of another double-precision decimal floating-point value. Set the quantum exponent of a quad-precision decimal floating-point value to the quantized128 math.h int quantexpd128(_Decimal128 x); quantum exponent of another quad-precision decimal floating-point value. Determine if the quantum __bool__ exponents of two single- samequantumd32 math.h samequantumd32(_Decimal32 x, precision decimal floating- _Decimal32 y); point values are the same. Determine if the quantum __bool__ exponents of two double- samequantumd64 math.h samequantumd64(_Decimal64 x, precision decimal floating- _Decimal64 y); point values are the same. Determine if the quantum __bool__ exponents of two quad- samequantumd128 math.h samequantumd128(_Decimal128 x, precision decimal floating- _Decimal128 y); point values are the same. Sends the signal sig to the raise signal.h int raise(int sig); running program. Returns a pseudo-random rand stdlib.h int rand(void); integer. Returns a pseudo-random rand_r stdlib.h int rand_r(void); integer. (Restartable version) Changes the size of a realloc stdlib.h void *realloc(void *ptr, size_t size); previously reserved storage block. regcomp regex.h Compiles the source regular expression pointed to by int regcomp(regex_t *preg, const pattern into an executable char *pattern, int cflags); version and stores it in the location pointed to by preg. size_t regerror(int errcode, const Finds the description for the regerror regex.h regex_t *preg, char *errbuf, size_t error code errcode for the errbuf_size); regular expression preg. regexec regex.h int regexec(const regex_t *preg, Compares the null-ended const char *string, size_t nmatch, string string against the System Function Include Function Prototype Description File compiled regular expression regmatch_t *pmatch, int eflags); preg to find a match between the two. Frees any memory that was allocated by regcomp to regfree regex.h void regfree(regex_t *preg); implement the regular expression preg. Deletes the file specified by remove stdio.h int remove(const char *filename); filename. int rename(const char *oldname, rename stdio.h Renames the specified file. const char *newname); Repositions the file pointer rewind1 stdio.h void rewind(FILE *stream); associated with stream to the beginning of the file. int scanf(const char *format-string, Reads data from stdin into scanf stdio.h arg-list); locations given by arg-list. void setbuf(FILE *stream, char Controls buffering for setbuf stdio.h *buffer); stream. Saves a stack environment setjmp setjmp.h int setjmp(jmp_buf env); that can be subsequently restored by longjmp. char *setlocale(int category, const Changes or queries variables setlocale locale.h char *locale); defined in the locale. int setvbuf(FILE *stream, char Controls buffering and setvbuf stdio.h *buf, int type, size_t size); buffer size for stream. void(*signal (int sig, void(*func) Registers func as a signal signal signal.h (int))) (int); handler for the signal sig. sin math.h double sin(double x); Calculates the sine of x. Calculates the hyperbolic sinh math.h double sinh(double x); sine of x. Same as sprintf except that int snprintf(char *outbuf, size_t n, the function will stop after n snprintf stdio.h const char*, ...) characters have been written to outbuf. Formats and stores int sprintf(char *buffer, const char sprintf stdio.h characters and values in *format-string, arg-list); buffer. Calculates the square root of sqrt math.h double sqrt(double x); x. Sets the seed for the pseudo- srand stdlib.h void srand(unsigned int seed); random number generator. System Function Include Function Prototype Description File Reads data from buffer into int sscanf(const char *buffer, const sscanf stdio.h the locations given by arg- char *format, arg-list); list. int srtcasecmp(const char *string1, Compares strings without strcasecmp strings.h const char *string2); case sensitivity. char *strcat(char *string1, const Concatenates string2 to strcat string.h char *string2); string1. char *strchr(const char *string, int Locates the first occurrence strchr string.h c); of c in string. int strcmp(const char *string1, Compares the value of strcmp string.h const char *string2); string1 to string2. Compares two strings using int strcoll(const char *string1, const strcoll string.h the collating sequence in the char *string2); current locale. char *strcpy(char *string1, const strcpy string.h Copies string2 into string1. char *string2); Returns the length of the size_t strcspn(const char *string1, initial substring of string1 strcspn string.h const char *string2); consisting of characters not contained in string2. Maps the error number in strerror string.h char *strerror(int errnum); errnum to an error message string. int strfmon (char *s, size_t maxsize, Converts monetary value to strfmon4 wchar.h const char *format, ...); string. Stores characters in an array size_t strftime (char *dest, size_t pointed to by dest, according strftime time.h maxsize, const char *format, const to the string determined by struct tm *timeptr); format. Calculates the length of strlen string.h size_t strlen(const char *string); string. int strncasecmp(const char *string1, Compares strings without strncasecmp strings.h const char *string2, size_t count); case sensitivity. Concatenates up to count char *strncat(char *string1, const strncat string.h characters of string2 to char *string2, size_t count); string1. Compares up to count int strncmp(const char *string1, strncmp string.h characters of string1 and const char *string2, size_t count); string2. Copies up to count char *strncpy(char *string1, const strncpy string.h characters of string2 to char *string2, size_t count); string1. System Function Include Function Prototype Description File Locates the first occurrence char *strpbrk(const char *string1, strpbrk string.h in string1 of any character in const char *string2); string2. char *strptime (const char *buf, strptime4 time.h Date and time conversion const char *format, struct tm *tm); char *strrchr(const char *string, int Locates the last occurrence strrchr string.h c); of c in string. Returns the length of the size_t strspn(const char *string1, initial substring of string1 strspn string.h const char *string2); consisting of characters contained in string2. Returns a pointer to the first char *strstr(const char *string1, strstr string.h occurrence of string2 in const char *string2); string1. double strtod(const char *nptr, char Converts nptr to a double strtod stdlib.h **endptr); precision value. Converts nptr to a single- _Decimal32 strtod32(const char strtod32 stdlib.h precision decimal floating- *nptr, char **endptr); point value. Converts nptr to a double- _Decimal64 strtod64(const char strtod64 stdlib.h precision decimal floating- *nptr, char **endptr); point value. Converts nptr to a quad- _Decimal128 strtod128(const char strtod128 stdlib.h precision decimal floating- *nptr, char **endptr); point value. float strtof(const char *nptr, char Converts nptr to a float strtof stdlib.h **endptr); value. Locates the next token in char *strtok(char *string1, const strtok string.h string1 delimited by the next char *string2); character in string2. Locates the next token in string delimited by the next char *strtok_r(char *string, const strtok_r string.h character in seps. char *seps, char **lasts); (Restartable version of strtok.) long int strtol(const char *nptr, char Converts nptr to a signed strtol stdlib.h **endptr, int base); long integer. long double strtold(const char Converts nptr to a long strtold stdlib.h *nptr, char **endptr); double value. unsigned long int strtoul(const char Converts string1 to an strtoul stdlib.h *string1, char **string2, int base); unsigned long integer. strxfrm string.h size_t strxfrm(char *string1, const Converts string2 and places System Function Include Function Prototype Description File the result in string1. The char *string2, size_t count); conversion is determined by the program's current locale. Formats and stores a series int swprintf(wchar_t *wcsbuffer, of wide characters and swprintf wchar.h size_t n, const wchar_t *format, values into the wide- arg-list); character buffer wcsbuffer. Reads data from buffer into int swscanf (const wchar_t *buffer, swscanf wchar.h the locations given by arg- const wchar_t *format, arg-list) list. Passes string to the system system stdlib.h int system(const char *string); command analyzer. tan math.h double tan(double x); Calculates the tangent of x. Calculates the hyperbolic tanh math.h double tanh(double x); tangent of x. Returns the current calendar time time.h time_t time(time_t *timeptr); time. time64_t time64(time64_t Returns the current calendar time64 time.h *timeptr); time. Creates a temporary binary tmpfile stdio.h FILE *tmpfile(void); file and opens it. Generates a temporary file tmpnam stdio.h char *tmpnam(char *string); name. Converts c to a character in toascii ctype.h int toascii(int c); the 7-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. Translates the wide character wint_t towctrans(wint_t wc, towctrans wctype.h wc based on the mapping wctrans_t desc); described by desc. Converts uppercase letter to towlower4 wctype.h wint_t towlower (wint_t wc); lowercase letter. Converts lowercase letter to towupper4 wctype.h wint_t towupper (wint_t wc); uppercase letter. Pushes c back onto the input ungetc1 stdio.h int ungetc(int c, FILE *stream); stream. Pushes the wide character stdio.h wint_t ungetwc(wint_t wc, FILE ungetwc6 wc back onto the input wchar.h *stream); stream. va_arg stdarg.h var_type va_arg(va_list arg_ptr, Returns the value of one System Function Include Function Prototype Description File argument and modifies var_type); arg_ptr to point to the next argument. void va_copy(va_list dest, va_list Initializes dest as a copy of va_copy stdarg.h src); src. Facilitates normal return va_end stdarg.h void va_end(va_list arg_ptr); from variable argument list processing. Initializes arg_ptr for void va_start(va_list arg_ptr, va_start stdarg.h subsequent use by va_arg variable_name); and va_end. Formats and prints stdio.h int vfprintf(FILE *stream, const characters to the output vfprintf stdarg.h char *format, va_list arg_ptr); stream using a variable number of arguments. Reads data from a specified stdio.h int vfscanf(FILE *stream, const stream into locations given vfscanf stdarg.h char *format, va_list arg_ptr); by a variable number of arguments. Equivalent to fwprintf, stdarg.h int vfwprintf(FILE *stream, const except that the variable vfwprintf6 stdio.h wchar_t *format, va_list arg); argument list is replaced by wchar.h arg. Reads wide data from a stdio.h int vfwscanf(FILE *stream, const specified stream into vfwscanf stdarg.h wchar_t *format, va_list arg_ptr); locations given by a variable number of arguments. Formats and prints stdio.h int vprintf(const char *format, characters to stdout using a vprintf stdarg.h va_list arg_ptr); variable number of arguments. Reads data from stdin into stdio.h int vscanf(const char *format, vscanf locations given by a variable stdarg.h va_list arg_ptr); number of arguments. Formats and stores int vsprintf(char *target-string, stdio.h characters in a buffer using a vsprintf const char *format, va_list stdarg.h variable number of arg_ptr); arguments. Same as vsprintf except that int vsnprintf(char *outbuf, size_t n, the function will stop after n vsnprintf stdio.h const char*, va_list); characters have been written to outbuf. System Function Include Function Prototype Description File Reads data from a buffer into stdio.h int vsscanf(const char*buffer, const vsscanf locations given by a variable stdarg.h char *format, va_list arg_ptr); number of arguments. Formats and stores a series int vswprintf(wchar_t *wcsbuffer, stdarg.h of wide characters and vswprintf size_t n, const wchar_t *format, wchar.h values in the buffer va_list arg); wcsbuffer. Reads wide data from a int vswscanf(const wchar_t *buffer, stdio.h buffer into locations given vswscanf const wchar_t *format, va_list wchar.h by a variable number of arg_ptr); arguments. Equivalent to wprintf, except stdarg.h int vwprintf(const wchar_t *format, vwprintf6 that the variable argument wchar.h va_list arg); list is replaced by arg. Reads wide data from stdin stdio.h int vwscanf(const wchar_t *format, into locations given by a vwscanf wchar.h va_list arg_ptr); variable number of arguments. Converts a wide character to int wcrtomb (char *s, wchar_t a multibyte character. wcrtomb4 wchar.h wchar, mbstate_t *pss); (Restartable version of wctomb.) Appends a copy of the string wchar_t *wcscat(wchar_t *string1, pointed to by string2 to the wcscat wchar.h const wchar_t *string2); end of the string pointed to by string1. Searches the wide-character wchar_t *wcschr(const wchar_t string pointed to by string wcschr wchar.h *string, wchar_t character); for the occurrence of character. Compares two wide- int wcscmp(const wchar_t *string1, wcscmp wchar.h character strings, *string1 const wchar_t *string2); and *string2. Compares two wide- int wcscoll (const wchar_t *wcs1, character strings using the wcscoll4 wchar.h const wchar_t *wcs2); collating sequence in the current locale. Copies the contents of wchar_t *wcscpy(wchar_t *string1, *string2 (including the wcscpy wchar.h const wchar_t *string2); ending wchar_t null character) into *string1. wcscspn wchar.h size_t wcscspn(const wchar_t Determines the number of System Function Include Function Prototype Description File wchar_t characters in the initial segment of the string *string1, const wchar_t *string2); pointed to by *string1 that do not appear in the string pointed to by *string2. Converts the time and date size_t wcsftime(wchar_t *wdest, specification in the timeptr wcsftime wchar.h size_t maxsize, const wchar_t structure into a wide- *format, const struct tm *timeptr); character string. Computes the number of size_t wcslen(const wchar_t wcslen wchar.h wide-characters in the string *string); pointed to by string. Formats numeric quantities struct wcslconv wcslocaleconv locale.h in struct wcslconv according *wcslocaleconv(void); to the current locale. Appends up to count wide wchar_t *wcsncat(wchar_t characters from string2 to wcsncat wchar.h *string1, const wchar_t *string2, the end of string1, and size_t count); appends a wchar_t null character to the result. int wcsncmp(const wchar_t Compares up to count wide wcsncmp wchar.h *string1, const wchar_t *string2, characters in string1 to size_t count); string2. wchar_t *wcsncpy(wchar_t Copies up to count wide wcsncpy wchar.h *string1, const wchar_t *string2, characters from string2 to size_t count); string1. Locates the first occurrence in the string pointed to by wchar_t *wcspbrk(const wchar_t wcspbrk wchar.h string1 of any wide *string1, const wchar_t *string2); characters from the string pointed to by string2. Date and time conversion. wchar_t *wcsptime ( const wchar_t Equivalent to strptime(), wcsptime wchar.h *buf, const wchar_t *format, struct except that it uses wide tm *tm ); characters. Locates the last occurrence wchar_t *wcsrchr(const wchar_t wcsrchr wchar.h of character in the string *string, wchar_t character); pointed to by string. Converts wide character size_t wcsrtombs (char *dst, const string to multibyte string. wcsrtombs4 wchar.h wchar_t **src, size_t len, mbstate_t (Restartable version of *ps); wcstombs.) System Function Include Function Prototype Description File Computes the number of wide characters in the initial segment of the string pointed size_t wcsspn(const wchar_t wcsspn wchar.h to by string1, which consists *string1, const wchar_t *string2); entirely of wide characters from the string pointed to by string2. wchar_t *wcsstr(const wchar_t Locates the first occurrence wcsstr wchar.h *wcs1, const wchar_t *wcs2); of wcs2 in wcs1. Converts the initial portion double wcstod(const wchar_t *nptr, of the wide-character string wcstod wchar.h wchar_t **endptr); pointed to by nptr to a double value. Converts the initial portion of the wide-character string _Decimal32 wcstod32(const wcstod32 wchar.h pointed to by nptr to a wchar_t *nptr, wchar_t **endptr); single-precision decimal floating-point value. Converts the initial portion of the wide-character string _Decimal64 wcstod64(const wcstod64 wchar.h pointed to by nptr to a wchar_t *nptr, wchar_t **endptr); double-precision decimal floating-point value. Converts the initial portion of the wide-character string _Decimal128 wcstod128(const wcstod128 wchar.h pointed to by nptr to a quad- wchar_t *nptr, wchar_t **endptr); precision decimal floating- point value. Converts the initial portion float wcstof(const wchar_t *nptr, of the wide-character string wcstof wchar.h wchar_t **endptr); pointed to by nptr to a float value. Breaks wcs1 into a sequence wchar_t *wcstok(wchar_t *wcs1, of tokens, each of which is wcstok wchar.h const wchar_t *wcs2, wchar_t delimited by a wide **ptr) character from the wide string pointed to by wcs2. Converts the initial portion long int wcstol(const wchar_t *nptr, of the wide-character string wcstol wchar.h wchar_t **endptr, int base); pointed to by nptr to a long integer value. wcstold wchar.h long double wcstold(const wchar_t Converts the initial portion System Function Include Function Prototype Description File of the wide-character string *nptr, wchar_t **endptr); pointed to by nptr to a long double value. size_t wcstombs(char *dest, const Converts the wchar_t string wcstombs stdlib.h wchar_t *string, size_t count); into a multibyte string dest. Converts the initial portion unsigned long int wcstoul(const of the wide-character string wcstoul wchar.h wchar_t *nptr, wchar_t **endptr, pointed to by nptr to an int base); unsigned long integer value. Transforms a wide-character string to values which size_t wcsxfrm (wchar_t *wcs1, represent character collating wcsxfrm4 wchar.h const wchar_t *wcs2, size_t n); weights and places the resulting wide-character string into an array. int wctob(wint_t wc); Determines whether wc corresponds to a member of the extended character set stdarg.h wctob whose multibyte character wchar.h representation is a single byte when in the initial shift state. Converts the wchar_t value int wctomb(char *string, wchar_t wctomb stdlib.h of character into a multibyte character); string. Constructs a value with type wctrans_t that describes a wctrans_t wctrans(const char wctrans wctype.h mapping between wide *property); characters identified by the string argument property. wctype_t wctype (const char Obtains handle for character wctype4 wchar.h *property); property classification. int wcswidth(const wchar_t *pwcs, Determine the display width wcwidth wchar.h size_t n); of a wide character string. Locates the first occurrence wchar_t *wmemchr(const wchar_t of c in the initial n wide wmemchr wchar.h *s, wchar_t c, size_t n); characters of the object pointed to by s. wmemcmp wchar.h int wmemcmp(const wchar_t *s1, Compares the first n wide const wchar_t *s2, size_t n); characters of the object pointed to by s1 to the first n characters of the object System Function Include Function Prototype Description File pointed to by s2. Copies n wide characters wchar_t *wmemcpy(wchar_t *s1, from the object pointed to by wmemcpy wchar.h const wchar_t *s2, size_t n); s2 to the object pointed to by s1. Copies n wide characters wchar_t *wmemmove(wchar_t *s1, from the object pointed to by wmemmove wchar.h const wchar_t *s2, size_t n); s2 to the object pointed to by s1. Copies the value of c into wchar_t *wmemset(wchar_t *s, each of the first n wide wmemset wchar.h wchar_t c, size_t n); characters of the object pointed to by s. Equivalent to fwprintf with int wprintf(const wchar_t *format, the argument stdout wprintf6 wchar.h arg-list); interposed before the arguments to wprintf. Equivalent to fwscanf with int wscanf(const wchar_t *format, the argument stdin wscanf6 wchar.h arg-list); interposed before the arguments of wscanf. Calculates the Bessel y0 math.h double y0(double x); function value of the second kind of order 0. Calculates the Bessel y1 math.h double y1(double x); function value of the second kind of order 1. Calculates the Bessel yn math.h double yn(int n, double x); function value of the second kind of order n.