软件水平考试程序员易错题(2018/12/13) |
第1题:若i、j已定义为int类型,则以下程序段中的内循环体的执行次数是( )
for( i=5; i; i--) for(j= 0; j<4;j++){……} A、20 B、24 C、25 D、30 |
【单选题】: |
第2题:不属于C语言保留字的是( )
A、for B、goto C、if D、loop |
【单选题】: |
第3题:struct stu
{ int num;char name[10];int age}; void py(struct stu *p) { printf("%s\n",(*p).name);} main() { struct stu student[3]={{1001,"Sun",25}, {1002,"Ling",23}, {1003,"Shen",22}; py(student+2); } |
【分析题】: |
第4题:合法的数组定义是( )
A、int a[]={"string"} B、int a[5]={0,1,2,3,4,5}; C、char a={"string"} D、char a[]={0,1,2,3,4,5}; |
【单选题】: |
第5题:1.main()
{ char str[]="1234567"; int i; for(j=0;i<7;i十=3) printf("%s\n",str+i); } |
【分析题】: |