选择题 执行以下程序段后,s的值为______。
int a[ ]={1,2,3,4,5,6,7,8,9},s=0,k;
for(k=0;k<8;k+=2)S+=*(a+k);
选择题 软件(程序)调试的目标是
选择题 若有以下定义和语句:
char s [10]='abcd!', *s2='\n123\\';
printf('%d %d\n', strlen(s1), strlen(s2));
则输出结果是______。
选择题 下列字符数组初始化语句中,不正确的是______。
选择题 以下程序的输出结果是______。
#include<stdio.h>
void prt(int *x,int *y,int *z)
{printf('%d,%d,%d\n',++*x,++*y,*(z++));}
main()
{int a=10,b=40,c=20;
prt(a,b,c);
prt(a,b,c);
}
选择题 属于软件概要设计阶段任务的是______。
选择题 一棵完全二叉树共有360个结点,则在该二叉树中度为1的结点数为______。
选择题 下面程序的输出结果是______。
#include<stdio.h>
main()
{inl a[]={1,3,5,7,9),y,*p=a[2];
y=*p--;
printf('%d,%d',y,*p);}
选择题 以下选项中叙述正确的是______。
选择题 有以下程序
#include<stdio.h>
main()
{unsigned char a=2,b=4,c=5,d;
d=a|b;d=c;printf('%d\n',d); }
程序运行后的输出结果是______。
选择题 设有定义:
char p[]={'1','2','3'},*q=p;
以下不能计算出一个char型数据所占字节数的表达式是______。
选择题 字符串“\\\'ABCDEF\'\\”的长度是______。
选择题 有以下程序:
#include<stdio.h>
main()
{
int i,j,x=0;
for(i=0;i<2;i++)
{
x++;
for(j=0;j<=3;j++)
{
if(j%2)continue;
x++;
}
x++;
}
printf('x=%d\n',x);
}
程序执行后的输出结果是______。
选择题 有如下程序:
#include <stdio.h>
main()
{
char ch='A';
while(ch<'D')
{
printf('%d', ch-'A');
ch++;
}
printf('\n');
}
程序运行后的输出结果是______。
选择题 有以下程序:
#include <stdio.h>
int fun()
{ static int x=1;
x*=2;
return x;
}
main()
{ int i,s=1;
for(i=l;i<=3;i++) s*=fun();
printf('%d\n',s);
}
程序运行后的输出结果是______。
选择题 有以下程序
# include<stdio.h>
main()
{ char c1,c2;
c1='A'+'8'-'4';
c2='A'+'8'-'5';
printf('%c,%d\n',c1,c2);
}
已知字母A的ASCII码为65,程序运行后的输出结果是______。
选择题 对下述程序的判断中,正确的是______。
#include<stdio.h>
void main()
{char*p,s[256];
p=s;
while(strcmp(s,'the end'))
{printf('Input the string:');
gets(s);while(*p)
putchar(*p++);}
}
选择题 在数据库的三级模式中,外模式(用户模式或子模式)有______。
选择题 以下程序的输出结果是_______。
main()
{ int i,a[10];
for(i=9;i>=0;i-)a[i]=10-i;
print('%d%d%d,a[2],a[5],a[8]);
}
选择题 下面程序运行后的输出结果是______。
#include<stdio.h>
main()
{ int a[5]={1,0,4,2,0},b[5]={1,2,3,4,5},i,s=0;
for(i=0;i<5;i++)s=s+b[a[i]];
printf('%d\n',s);
}