摘要: int(*f)(int);为指向函数的指针变量的定义方法,其中f为指向函数的指针变量,第一个int为函数返回值类型,第二个int为函数的形参类型。 阅读全文
posted @ 2015-09-13 13:42 Mr__sun 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 有以下程序#include main(){ int a=1,b=2,c=3,d=0;if (a==1 && b++==2)if (b!=2||c--!=3)printf("%d,%d,%d\n",a,b,c);else printf("%d,%d,%d\n",a,b,c);else printf("... 阅读全文
posted @ 2015-09-13 13:03 Mr__sun 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 有以下定义和语句struct workers{ int num; char name[20]; char c;struct{ int day; int month; int year;} s;};struct workers w,*pw;pw=&w;能给w中year成员赋1980的语句是先要得到内层... 阅读全文
posted @ 2015-09-13 12:40 Mr__sun 阅读(247) 评论(0) 推荐(0) 编辑
摘要: #include main(){ FILE *f;f=fopen("filea.txt","w");fprintf(f,"abc");fclose(f);}若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为abc内容为重新写入后的内容 阅读全文
posted @ 2015-09-13 12:24 Mr__sun 阅读(249) 评论(0) 推荐(0) 编辑