摘要: 一路跌跌撞撞 迷迷茫茫 只想快点进步 提升自己 记录代码路上的点点滴滴 或许我不足够优秀 但是我比昨日优秀 阅读全文
posted @ 2021-12-01 17:02 江南王小帅 阅读(35) 评论(0) 推荐(0)
摘要: //指针数组 int *p2[5]; //根据优先级的结合方式,先结合p1与[5],即p1[5],故 首先是一个数组 //而前方有一个指针符号 故 是指针数组 // 下标 0 1 2 3 4 // 元素 int* int* int* int* int* //指针数组是一个数组,每个数组元素存放一个指 阅读全文
posted @ 2021-12-01 16:44 江南王小帅 阅读(50) 评论(0) 推荐(0)
摘要: //指针和数组的区别 char str[] = "I love fishC.com!"; int count = 0; while (*str++ != '\0') // 报错,str 是一个地址,不是可修改的左值 { count++; } printf("一共有%d个字符\n", count); 阅读全文
posted @ 2021-12-01 16:26 江南王小帅 阅读(33) 评论(0) 推荐(0)
摘要: //指针与数组 char str[120]; printf("please input a string:\n"); scanf_s("%s\n", str); printf("your str is :%p\n", str); printf("your str is :%p\n", &str[0] 阅读全文
posted @ 2021-12-01 15:30 江南王小帅 阅读(36) 评论(0) 推荐(0)
摘要: //指針的定義 char a = 'f'; int f = 123; char *pa = &a; int *pb = &f; printf("a = %c\n", *pa); printf("f = %d\n", *pb); *pa = 'c'; *pb = 1; printf(" now a = 阅读全文
posted @ 2021-12-01 15:27 江南王小帅 阅读(35) 评论(0) 推荐(0)