函数家园

这篇博文主要是汇总了一些在C语言中的函数
内容会不断更新
请持续关注
<stdio.h>包含的函数

# include<stdio.h>
scanf();输入函数
printf();输出函数
getchar();输入函数
gets();输入函数
putchar();输出函数
puts();输出函数
sprintf();输出函数
d=99;
sprintf(str,"price is %d",d);
sscanf();输入函数
"410931199905060123"
sscanf(str,"%*6d%4d%2d%2d",&year,&month,&day);

<math.h>包含的函数

# include<math.h>
fabs();求绝对值函数
sqrt();求平方根函数
pow();求幂函数
exp();求e的x次方
log();求自然对数
log10();求以10为底的对数
sin();cos();tan();三角函数

<string.h>包含的函数

strlen();求字符串的长度
strcpy();复制字符串
strncpy();复制字符串
strcmp();字符串的比较
strncmp();字符串的比较
strcat();字符串的连接
strncat();字符串的连接
strrev();字符穿的逆置

<stdlib.h>包含的函数

# include<stdlib.h>

<memory.h>包含的函数

# include<memory.h>
memset();
int a[];
memset(a,0.sizeof(a));

猜你喜欢

转载自blog.csdn.net/qq_45858803/article/details/109731195