C语言中常用的函数

字符串函数

    复制函数strcpy()  格式 strcpy(字符串数组名,"字符串");

    连接函数strcat(字符串数组1,字符串数组2)   格式  strcat(字符串1,字符串2);

    比较函数strcmp()  格式 strcmp(字符串1,字符串2);  

常用的数学函数

int abs(int x)  求整数绝对值   

double fabs (double x) 求实数绝对值   

double sqrt(double x)  求平方根   

double sin(double x)  求正弦的值 

double cos(double x) 求余弦的值  

double log(double x) 求ln(x)的值 

double pow(double x,double y) 求x的y次幂 

int rand(void) 生成随机数(-90~32767)格式    

猜你喜欢

转载自blog.csdn.net/chaolingw/article/details/79856947