摘要: --------------------------------------------------------------------------------- 阅读全文
posted @ 2020-11-18 22:12 Connor_Jiao 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 1. malloch函数返回的是4个字节中的第一个字节的地址,那为什么要加强制类型转换呢,是因为根据第一个字节地址,可以把8个字节当一个变量也可以把4个字节当一个变量,所以malloc函数返回的是一个无意义的地址也就是干地址,所以需要告诉编译器我们返回的是哪种类型的地址,把第一个字节地址当成一个整形 阅读全文
posted @ 2020-11-18 21:49 Connor_Jiao 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-11-18 16:49 Connor_Jiao 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> //2020年11月18日16:18:49 // int main(void) { char ch='a'; int i=99; double x=66.6; char * p=&ch; int * q=&i; double * r=&x; printf("%d, 阅读全文
posted @ 2020-11-18 16:23 Connor_Jiao 阅读(328) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> void f(int *pArr,int len) { int i; for(i=0;i<len;i++) { printf("%d\n",*(pArr+i)); printf("%#X\n",pArr+i); } } int main(void) { int a 阅读全文
posted @ 2020-11-18 11:12 Connor_Jiao 阅读(204) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> void huhuan_1(int,int); void huhuan_2(int *,int *); void huhuan_3(int *,int *); int main(void) { int a=3,b=5; //huhuan_1(a,b); //huh 阅读全文
posted @ 2020-11-18 10:31 Connor_Jiao 阅读(73) 评论(0) 推荐(0) 编辑