单选题现有如下程序段 #include "stdio.h" main() { int k[30]={12,324,45,6,768,98,21,34,453,456}; int count=0,i=0; while(L[i]) { if(k[i]%2==0||k[i]%5==0)count++; i++; } printf("%d,%d/n",count,i);} 则程序段的输出结果为
单选题设有说明语句如下: static char str[]="Beijing"; 若执行下列输出语句: printf("%d/n",strlen(strcpy(str,"China")));则输出结果为( )。 A) 5 B) 7 C) 12 D) 14
单选题表示关系式x≤y≤z的C语言表达式的是______。
单选题以下选项中不能用作C程序合法常量的是( )。
单选题以下错误的定义语句是______。
单选题有以下程序 #include<stdio.h> main() int a=5,b=lt; t=(a<<2)|b;printf("%d/n",t); 程序运行后的输出结果是______。 A) 21 B) 11 C) 6 D) 1
单选题下面程序运行后的输出结果是______。 struct abc int a,b,c; main() struct abc s[2]=1,2,3,4,5,6; int t=-s[0].a+s[1].b; printf("%d/n",t); A) 5 B) 6 C) 7 D) 8
单选题以下关于字符串的定义和赋值语句,正确的是( )。
单选题C语言中形参的默认存储类别是______。
A.自动(auto)
B.静态(static)
C.寄存器(register)
D.外部(extern)
单选题下列选项中不属于C语言的数据类型是( )。
单选题有以下程序 main() int a,b,d=25; a=d/10 % 9; b=a printf ("%d,%d/n",a,B) ; 程序运行后的输出结果是
单选题有如下程序:
#include<stdio.h>
main()
{
int a=0,b=1;
if(++a==b++)
printf("T");
else
printf("F");
printf("a=%d,b=%d/n",a,b);
printf("/n");
}
程序运行后的输出结果是______。
单选题有以下程序:
#include<stdio.h>
#define SUB(a)(a)-(a)
main()
{ int a=2, b=3, c=5, d;
d=SUB(a+b)*c;
printf("%d/n", d);
}
程序运行后的输出结果是______。
单选题已知某程序中有声明“int a[4],j;”及语句“for(j=0;j<4;j++)p[j]=a+j;”,则标识符P正确的声明形式应为______。
单选题有以下程序: fun (iht a,int b) { if(a>b)return(a); else return(b); } main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf("%d/n",r); } 程序运行后的输出结果是( )。
单选题有以下程序: #include<stdio.h>
main() {int a[3][4]={1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21,
23}, (*p)[4]=a, i, j, k=0; for(i=0; i<3; i++)
for(j=0; j<2; j++)k+=*(*(p+i)+j); printf("%d/n",
k); 程序的输出结果是
A.60
B.68
C.99
D.108
单选题若要求从键盘读人含有空格字符的字符串,应该使用函数( )。 A) getc() B) gets() C) getchar() D) scanf()
单选题有以下程序: #include<stdio.h> main() { char c1,c2; c1='A'+'8'一'4'; c2='A'+'8'一'5'; printf("%c %d\n",c1,c2); } 已知字母A的ASCII码为65,程序运行后的输出结果是( )。
单选题以下关于C语言中逻辑运算符两侧运算对象的叙述中正确的是( )。
单选题某二又树有5个度为2的结点,则该二叉树中的叶子结点数是( )。