Functions included in the C language header file

Source: Internet
Author: User

MATH.H Common functions
int abs (int x);
Double ACOs (double x);
Double asin (double x);
Double Atan (double x);
Double atan2 (double y, double x);
Double atof (const char *s);
Double ceil (double x);
Double cos (double x);
Double cosh (double x);
Double exp (double x);
Double fabs (double x);
Double floor (double x);
Double Fmod (double x, double y);
Double Frexp (double x, int *exponent);
Long Labs (long x);
Double Ldexp (double x, int exponent);
Double log (double x);
Double log10 (double x);
Double modf (double x, double *ipart);
Double pow (double x, double y);
Double sin (double x);
Double Sinh (double x);
Double sqrt (double x);
Double tan (double x);
Double Tanh (double x);


Stdio.h common functions include
int fclose (FILE *stream);
int fflush (FILE *stream);
int fgetc (FILE *stream);
int Fgetpos (FILE *stream, fpos_t *pos);
char * fgets (char *s, int n, FILE *stream);
FILE * fopen (const char *path, const char *mode);
int fprintf (FILE *stream, const char *format, ...);
int FPUTC (int c, FILE *stream);
int fputs (const char *s, FILE *stream);
size_t fread (void *ptr, size_t size, size_t N, FILE *stream);
FILE * freopen (const char *path, const char *mode,
FILE *stream);
int fscanf (FILE *stream, const char *format, ...);
int fseek (FILE *stream, long offset, int whence);
int Fsetpos (FILE *stream, const fpos_t *pos);
Long Ftell (FILE *stream);
size_t fwrite (const void *ptr, size_t size, size_t N,
FILE *stream);
int printf (const char *format, ...);
int puts (const char *s);
int rename (const char *oldname, const char *newname);
void Rewind (FILE *stream);
int scanf (const char *format, ...);




Stdlib.h common functions include
Stdlib header file contains some functions of C and C + + language


This file contains the definition of the C language standard library function


The stdlib.h defines five types, some macros, and common tool functions. Types such as size_t, wchar_t, div_t, ldiv_t, and lldiv_t, macros such as Exit_failure, Exit_success, Rand_max, and Mb_cur_max, etc., commonly used functions such as malloc (), Calloc (), realloc (), free (), System (), Atoi (), ATOL (), Rand (), Srand (), exit (), and so on. Specific content you can open the compiler's include directory inside the stdlib.h header file to see
int abs (int x);
int atexit (atexit_t func);
Double atof (const char *s);
int atoi (const char *s);
Long Atol (const char *s);
void * bsearch (const void *key, const void *base,
size_t Nelem, size_t width,
Int (*fcmp) ());
void * CALLOC (size_t nitems, size_t size);
div_t Div (int numer, int denom);
void exit (int status);
void free (void *block);
char * getenv (const char *name);
Long Labs (long x);
ldiv_t Ldiv (Long numer, long denom);
void * malloc (size_t size);
void Qsort (void *base, size_t nelem, size_t width,
Int (*fcmp) ());
int rand (void);
void * ReAlloc (void *block, size_t size);
void Srand (unsigned seed);
Double strtod (const char *s, char **endptr);
Long strtol (const char *s, char **endptr, int radix);
unsigned long strtoul (const char *s, char **endptr, int radix);
int system (const char *command);
Max (b) ((a) > (b))? (a): (b))
Min (b) ((a) < (a))? (a): (b))


Random (NUM) (rand ()% (num))
Randomize () Srand ((unsigned) time (NULL))


String.h commonly used functions include:
char * stpcpy (char *dest, const char *SRC);
char * strcat (char *dest, const char *SRC);
char * STRCHR (const char *s, int c);
int strcmp (const char *S1, const char *S2);
char * strcpy (char *dest, const char *SRC);
size_t strcspn (const char *S1, const char *S2);
char * strdup (const char *s);
char * strerror (int errnum);

Conio.h is not a header file in the C standard library.
Conio is a shorthand for console input/output (console input and output), which defines the functions of data input and data output through the console, mainly the corresponding actions that some users produce by pressing the keyboard, such as the Getch () function, and so on.
The included functions
Cgets (char *);
cprintf (const char *, ...);
Cputs (const char *);
CSCANF (const char *, ...);
INP (unsigned short);
INPW (unsigned short);
Getch (void);
Getche (void);
Kbhit (void);
OUTP (unsigned short, int);
OUTPW (unsigned short, unsigned short);
Putch (int);
Ungetch (int);
void _cdecl clreol (void);
void _cdecl clrscr (void);
void _cdecl delline (void);
int _cdecl gettext (int left, int top, int. right, int bottom,
void *destin);
void _cdecl gettextinfo (struct text_info *r);
void _cdecl gotoxy (int x, int y);
void _cdecl highvideo (void);
void _cdecl insline (void);
void _cdecl lowvideo (void);
int _cdecl movetext (int left, int top, int. right, int bottom,
int destleft, int desttop);
void _cdecl normvideo (void);
int _cdecl puttext (int left, int top, int. right, int bottom,
void *source);
void _cdecl textattr (int newattr);
void _cdecl textbackground (int newcolor);
void _cdecl textcolor (int newcolor);
void _cdecl textmode (int newmode);
int _cdecl Wherex (void);
int _cdecl wherey (void);
void _cdecl window (int left, int top, int. right, int bottom);
Har *_cdecl cgets (char *str);
int _cdecl cprintf (const char *format, ...);
int _cdecl cputs (const char *STR);
int _cdecl cscanf (const char *format, ...);
int _cdecl getch (void);
int _cdecl getche (void);
Char *_cdecl getpass (const char *prompt);
int _cdecl kbhit (void);
int _cdecl putch (int c);

int _cdecl ungetch (int ch);


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.