<span>常用函数</span>

#include <math.h>

double exp(double x)  求e^x的值

double fmod(double x,double y)  浮点数取模x%y

double modf(double x, double *y)  返回x的小数部分,将整数部分给y

#include <string.h>

char *strncpy(char *p1, const char *p2, int n)  p2所指向的字符串(至多n个字符)拷贝到p1所指向的存储区中

char *strncat(char *p1, const char *p2, int n)  p2所指向的字符串(至多n个字符)连接到p1所指向的字符串的后面

char *strncmp(const char *p1, const char *p2, int n)  比较p1,p2所指向的两个字符串的大小,至多比较n个字符

#include <stdlib.h>

double atof(char *s)  s所指向的字符串转换成实数

int atoi(char *s)  s所指向的字符串转换成整数

全部评论

相关推荐

09-23 08:41
已编辑
门头沟学院 Java
牛客吹哨人:可恶!它越来越嚣张了...哨哥晚点统一更新到黑名单:能救一个是一个!26届毁意向毁约裁员黑名单https://www.nowcoder.com/discuss/1525833
点赞 评论 收藏
分享
秋招投简历提醒助手:简历内容全部去掉,黑体加粗大写北京大学
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务