中易网

C语言各种头文件及其中函数的应用

答案:2  悬赏:50  
解决时间 2021-11-15 12:05
我想知道c语言中的头文件的名称和应用。。最好有其中的函数。。。 还有一个。。我们教师讲可能由系统自动给数组规定大小用的是stdlid.h吧。还联系到指针。。怎么用的。谢谢。我把我所有的百度积分贡献了。。
最佳答案
math.h常用函数包括
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常用函数包括

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常用函数包括
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(a,b) (((a) > (b)) ? (a) : (b))
min(a,b) (((a) < (b)) ? (a) : (b))

random(num) (rand() % (num))
randomize() srand((unsigned)time(NULL))
string.h常用函数包括:
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);
全部回答
先新建一个myhead.h 内容通常自定义文件格式: #ifndef _myhead_h_ #define _myhead_h_ (这里是头文件的内容) #endif 然后在你的.c中#include“myhead.h”就可以了 记得放在一个工程目录下
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
福清市龙江东南村属于哪个公安局管
攢天的意思是什么?攢天的释义是什么啊?
有什么实战得分后卫外场篮球鞋介绍
两岁宝宝晚上腋下体温都是在36℃到36.4℃算是
梦见生日蛋糕是什么意思?好不好呢?
天然琥珀蜜蜡批发市场在哪里
如何为英语教师进行心理减压
高考时天气太热,脑瓜仁疼,答不上来题了怎么
打油歌的意思是什么?打油歌的释义是什么啊?
旭日东升是什么意思啊?
耳机的左声道右声道有什么作用,有何区别
性激素3.8是啥意思
设计钢结构单层厂房12米跨度的屋盖可以不加支
丛斑鸠店到东平怎么走
请问ABC的卫生巾到底好不好?
推荐资讯
黄山松 短文写了黄山松的哪几个特色?
过年给母亲送什么礼物?
扬州哪里有绝味鸭脖店
备孕吃什么水果有好处
为什么吃了几个枣子胸口门的慌,有...
数东瓜,道茄子是什么意思啊?
中国电信(五里河乡营业厅)地址在什么地方,想
谁知道华硕a40j显卡能不能换?
万寿无疆是什么意思啊?
初学炒股票该如何入手?赚第一桶金?
天下无双是什么意思啊?
石狮市锦尚镇东店老年协会地址在哪,我要去那
手机登qq时,显示手机磁盘不足,清理后重新登
刺客的套装怎么选啊?