当前位置:网站首页>标准C语言学习总结10
标准C语言学习总结10
2022-07-28 20:01:00 【c7473168】
字符串相关操作函数
int atoi(const char *nptr);
功能:字符串转int类型
long atol(const char *nptr);
功能:字符串转long类型
long long atoll(const char *nptr);
功能:字符串转long long类型
double atof(const char *nptr);
功能:字符串转double类型
char *strstr(const char *haystack, const char *needle);
功能:在haystack中查找是否存在子串needle
返回值:needle在haystack中首次出现的位置,如果找不到则返回NULL
int sprintf(char *str,const char *format, ...);
功能:把各种类型的数据输出给字符串str
返回值:转换后字符个数
int sscanf(const char *str, const char *format, ...);
功能:从str中解析读取数据到变量中
返回值:成功解析出来的变量个数
void *memcpy(void *dest, const void *src, size_t n);
功能:从src位置拷贝n个字节到dest的位置
功能:链式调用
int memcmp(const void *s1, const void *s2, size_t n);
功能:比较两块内存的值,按照字节比较,一旦比较出结果后面不再比较
返回值: s1 == s2 0
s1 < s2 负数
s1 > s2 正数
边栏推荐
- Huawei releases the first electric drive system driveone: charging for 10 minutes, endurance of 200km
- It is said that Microsoft has obtained the supply license for Xianghua! Will Huawei usher in the full lifting of the ban?
- Go concurrent programming basics
- Pytorch学习记录(三):随机梯度下降、神经网络与全连接
- 学习Typescript(二)
- Uniapp progress bar customization
- Bus, protocol, specification, interface, data acquisition and control system in industrial communication field
- Uncaught Error:Invalid geoJson format Cannot read property ‘length‘ of undefind
- CVPR 2022 | in depth study of batch normalized estimation offset in network
- 苹果M1处理器详解:性能及能效成倍提升,Intel酷睿i9也不是对手!
猜你喜欢

(PMIC) full and half bridge drive csd95481rwj PDF specification
![Leetcode interview question 02.07. Linked list intersection [knowledge points: Double pointers, stack]](/img/51/ec623bb609f5f57150e7244cf5f9b7.png)
Leetcode interview question 02.07. Linked list intersection [knowledge points: Double pointers, stack]

Top level "redis notes", cache avalanche + breakdown + penetration + cluster + distributed lock, Nb

Why on earth is it not recommended to use select *?

【Bluetooth蓝牙开发】八、BLE协议之传输层

纳米金偶联抗体/蛋白试剂盒(20nm,1mg/100μg/500 μg偶联量)的制备

中国农业工程学会农业水土工程专业委员会-第十二届-笔记

Talk about row storage and column storage of database

日志瘦身神操作:从5G优化到1G到底是怎么做到的!(荣耀典藏版)

LeetCode·581.最短无序连续子数组·双指针
随机推荐
Construction of Chinese traditional embroidery classification model based on xception TD
MySQL
这种动态规划你见过吗——状态机动态规划之股票问题(下)
微星宝安工厂失火!官方回应:无人员受伤,产线不受影响!
Edited by vimtutor
Invalid prompt object name in SQL Server
Uniapp progress bar customization
Automatic filling of spare parts at mobile end
Study - Summary of geometric calculations
蚂蚁集团境外站点 Seata 实践与探索
Mysql的B+树高度计算
Summary of 29 typical problems in Devops planning and construction of securities enterprises based on containerized PAAS platform
Cy3/Cy5/Cy5.5/Cy7荧光标记抗体/蛋白试剂盒(10~100mg标记量)
职场高薪 |「中高级测试」面试题
Four methods of multi-threaded sequential operation. Ask casually during the interview
Top level "redis notes", cache avalanche + breakdown + penetration + cluster + distributed lock, Nb
华为发布首款电驱动系统DriveONE:充电10分钟续航200km
MySQL 是如何归档数据的呢?
不用Swagger,那我用啥?
PyQt5快速开发与实战 5.4 网页交互