不是什么文档,也不是教程,只是监督自己打卡学习C语言,记录的只是自己一些小笔记。如有错处,十分感谢您指出!!!
一、判断字符类型
- #include<ctype.h>,isdigit()…
二、字符串与其他数值类型的转换
- #include<stdlib.h>
三、字符串的长度与比较
-
#include<string.h>,strlen()
-
strnlen(gcc)与strnlen_s(c11msvc)
-
strcmp,strncmp
四、数组指针
int temp[]={
0,1,2};
int *p = temp;//指向数组第一个元素的指针
int (*b)[] = &temp;//数组的指针
数组的名称的内容与自己的内存编号一致,在使用指向数组的指针时候,要先读取一遍
int temp[]={
0,1,2};
int *p = temp;
int (*b)[] = &temp;
int main(void){
printf("%d\n",*(p+1));
printf("%d\n",p);
printf("%d\n",*b);
printf("%d\n",&temp);
printf("%d\n",temp);
printf("%d\n",*(*b+1));
printf("%d\n",*(temp+1));
return 0;
}
- void指针是通用指针
五、函数参数
- 传递数组时候,其实传递的是地址