mokongking

2023年4月3日 #

C语言itoa函数

摘要: 一、atoi()函数atoi()是C语言中的字符串转换成整型数的一个函数 (1)【头文件】#include <stdlib.h> (2)【函数原型】int atoi (const char * str); (3)【函数说明】atoi() 函数会扫描参数 str 字符串,跳过前面的空白字符(例如空格, 阅读全文

posted @ 2023-04-03 14:36 虎啸岳林 阅读(4116) 评论(0) 推荐(0) 编辑

提取某一位

摘要: #define GET_BIT(x, bit) ((x & (1 << bit)) >> bit)//提取第bit位(二进制数) uint8_t a = 0b10101010100uint8_t b = GET_BIT(a,2);//提取a这个变量的第2个值b = 1 阅读全文

posted @ 2023-04-03 11:06 虎啸岳林 阅读(19) 评论(0) 推荐(0) 编辑

C语言,str系列函数

摘要: 1、strcat() 此函数原型为 char *strcat(char *dest, const char *src). 功能为连接两个字符串,把src连接到dest后面;返回dest地址 //函数实现char * strcat(char *dest,const char *src) { char* 阅读全文

posted @ 2023-04-03 11:04 虎啸岳林 阅读(250) 评论(0) 推荐(0) 编辑

导航