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

全部评论

相关推荐

06-11 17:39
门头沟学院 Java
小呆呆的大鼻涕:卧槽,用户彻底怒了
点赞 评论 收藏
分享
05-30 12:03
山西大学 C++
offer来了我跪着...:不是骗子,等到测评那一步就知道为啥这么高工资了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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