摘要: typedef:为已有的数据类型改名 typedef 已有的数据类型 新名字 ; #include <stdio.h> #include <stdlib.h> typedef int INT ;//将int改名INT /*typedef int INT ;//将int改名INT *INT i ; - 阅读全文
posted @ 2016-02-26 15:46 muzihuan 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 共用体:同一时刻只有一个发生 union 共用体名 { 数据类型 成员1; 数据类型 成员2; ....... }; 定义: #include <stdio.h> #include <stdlib.h> union test_un { int i ; float f ; double d ; cha 阅读全文
posted @ 2016-02-26 14:22 muzihuan 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 结构体定义: struct 结构体名 { 数据类型 成员1 ; 数据类型 成员2; ....... };//分号绝对不能丢 ps:结构体类型描述是不占内存空间的,所以不能直接赋值. 简单的定义与引用: #include <stdio.h> #include <stdlib.h> #define NA 阅读全文
posted @ 2016-02-26 12:05 muzihuan 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 指针函数:返回值为指针的函数 返回值 * 函数名(形参) eg:int * fun(int); 函数指针:指针指向函数 类型 (*指针类型)(形参)//注意括号 eg:int (*p)(int) #include <stdio.h> #include <stdlib.h> int add(int a 阅读全文
posted @ 2016-02-26 10:32 muzihuan 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> /* * *int a[M][N]={...}; *int *p = *a ; *int (*q)[N]= a ; * *值 a[i][j] *(a+i)+j a[i]+j p[i] *p q[i][j] *q q p+3 阅读全文
posted @ 2016-02-26 09:39 muzihuan 阅读(484) 评论(0) 推荐(0) 编辑