下列程序运行后,输出的结果是________。#includevoidmain(){charp[][10]={"BOOL","OPK","H","SP"};inti;for(i=3;i>=0;i--,i--)printf("%c",p[i][0]);printf("\n");}
A. BOHS
B. SHOB
C. HB
D. SO
查看答案
函数f的功能是:测定字符串的长度,空白处应填入________。#includeintf(chars[]){inti=0;while(s[i]!='\0')i++;return(________);}voidmain(){printf("%d\n",f("goodbye!"));}
A. i-1
B. i
C. i+1
D. s
下列程序的输出结果是________。#includevoidmain(){charch[2][5]={"6934","8254"};inti,j;longs=0;for(i=0;i<2;i++)for(j=0;ch[i][j]>'0'&&ch[i][j]<='9';j++)s=10*s+ch[i][j]-'0';printf("%ld\n",s);}
A. 6385
B. 6982
C. 693825
D. 69348254
设已包含头文件和,下面程序段的运行结果是________。chars1[20]="ancient";chars2[]="new";strcpy(s1,s2);printf("%d\n",strlen(s1));
A. 3
B. 4
C. 6
D. 7
下面程序运行后,输出结果是________。#includevoidmain(){staticcharb[]="Goodbye";intn=7;while(--n>0)putchar(b[n]);putchar('\n');}
A. eybdooG
B. eybdoo
C. ybdooG
D. ybdoo