有以下程序
void main( )
{ char k;int i;
for(i=1;i<3;i++)
{ scanf("%c",&k);
switch(k)
{ case '0': printf("another\n");
case '1': printf("number\n");}
}
}
程序运行时,从键盘输入:01<回车>,程序执行后的输出结果是( )
A、another B、another C、another D、number
number number number number
another number
若变量已正确定义并赋值,不符合C语言语法的表达式是( )
A> a*b/c; B> 3.14%
执行下列程序段,输出的结果是。
# include
int f(int x)
{ static y=1;
y++;
x += y;
return x;
}
void main( )
{ int k;
k=f(3);
printf("%d %dn", k, f(k));
}
main()
{ char *s[]={"one","two","three"},*p;
p=s[1];
printf("%c,%s\n",*(p+1),s[0]);
}
A> n,two B> t,one C> w,one D> o,two
下列程序执行后的输出结果是 。
main()
{ int a[3][3], *p,i;
p=&a[0][0];
for(i=1; i<9; i++)p[i]=i+1;
printf("%d\n",a[1][2]);
}