摘要:
#include #include int main(){ char str[][30] = {"zhangsan","lisi","wangwu"}; char (*p)[30] = str; //定义行指针 printf("%p %p %p 行数:%d 列数:%d\n",str, &str[0], &str[0][0], sizeof(str)/sizeof(str[0]),siz... 阅读全文
posted @ 2018-03-16 23:57
王默默
阅读(3804)
评论(0)
推荐(0)
摘要:
#include #include int main(){ int a = 100; void *p = &a; printf("a:%d address:%p\n",*(int*)p, &a); //unsigned int *pt = (unsigned int*)0xbfa70ee8; int *pt = (int*)malloc(sizeof(int)); *pt = 2... 阅读全文
posted @ 2018-03-16 23:11
王默默
阅读(2924)
评论(0)
推荐(0)
摘要:
#include int main(void){ void *p; int a = 14322; char c ='A'; p = &a; //p = &c; //强制类型转换(int*)p 把变量指针p强制转换成指向int类型的指针 printf("a=%d\n",*(int*... 阅读全文
posted @ 2018-03-16 17:51
王默默
阅读(7528)
评论(0)
推荐(0)
浙公网安备 33010602011771号