摘要: #include #include int main(void){ //char dest[10]; //#define NULL (void *)0 //char *dest = NULL; //dest是野指针,指向的区域没有可读写空间 //char... 阅读全文
posted @ 2015-09-20 20:28 微博和csdn还有你 阅读(483) 评论(0) 推荐(0) 编辑
摘要: 字符串数组指针和数组等价转换void foo(int *p,int n){ int i; for(i=0;i<n;i++) { printf("%d\n",p[i]); //printf("%d\n",*(p+i)); }}void main(){... 阅读全文
posted @ 2015-09-20 17:07 微博和csdn还有你 阅读(128) 评论(0) 推荐(0) 编辑
摘要: (类型)变量/常量c语言运算符算数运算符 + - * / % 5%-3 -5%3关系运算符 > = 71111 -> Fint a[10];a 表示地址,首元素地址a[0] a[1] a[2]a[3] a + 12BYTE循环语句while表达式1;while(表达式2){ 语句。。。; 表达式3... 阅读全文
posted @ 2015-09-20 16:52 微博和csdn还有你 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1.宏替换,完全展开替换,注意带来副作用#include #define 打印语句 printf(“hello”);Void main(void){ If (1) 打印语句;; Else ….;}Void main(void){ If (1) printf(“hello”); ; Else ….;}... 阅读全文
posted @ 2015-09-20 16:51 微博和csdn还有你 阅读(128) 评论(0) 推荐(0) 编辑