<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所指向的字符串转换成整数

全部评论

相关推荐

996的工作制还是没能硬啃下去,快要面试怂了,取消了
牛客80700350...:很正常,不是所有人都能接受这种强度的。不叫怯战,这叫明智
点赞 评论 收藏
分享
wu970:标准北漂配置,怎么看着装修风格有点像自如的😭
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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