以下程序的运行结果是_________。#include main(){static int a[]={5,3,7,2,1,5,4,10};int s=0,k;for (k=0;k<8;k+=2)s+=*(a+k);printf("%d\n",s);}
查看答案
以下程序的运行结果是_______。#include main(){int a[]={1,2,3,4,5,6};int x,y,*p;p=&a[0];x=*(p+2);y=*(p+4);printf("%d,%d,%d\n",*p,x,y);}
A. 1,3,5
B. 2,4,6
C. 1,1,1
D. 3,3,3
以下程序的运行结果是________。#include main(){int a[]={1,2,3,4,5,6};int *p=a;printf("%d,",*p);printf("%d,",*(++p));printf("%d,",*++p);printf("%d,",*(p--));p+=3;printf("%d,%d\n",*p,*(a+3));}
A. 1,2,3,3,2,1
B. 1,2,3,3,5,4
C. 1,3,5,3,3,3
D. 1,3,5,5,3,1
以下程序的运行结果是_______。#include main(){char str[2][5]={"7045","9265"},*a[2];int i,j,s=0;for (i=0;i<2;i++)a[i]=str[i];for (i=0;i<2;i++)for (j=0;a[i][j]>'0' && a[i][j]<='9';j+=2)s=10*s+a[i][j]-'0';printf("%d\n",s);}
A. 7496
B. 70936
C. 74936
D. 704936
以下程序的运行结果是______。#include main(){static char c[]="china";char *p=c;while (*p)printf("%c",*p++-32);printf("\n");}
A. china
B. CHINA
C. ch
D. 陷入死循环