首页
题库
网课
在线模考
桌面端
登录
搜标题
搜题干
搜选项
0
/ 200字
搜索
填空题
以下程序运行后的输出结果是______。
main()
int x,a=1,b=2,c=3,d=4;
x=(a<B)A:B; X=(A<C)X:C; X=(D>x)x:d;
printf("%d\n",x);
答案:
A
点击查看答案
在线练习
手机看题
你可能感兴趣的试题
填空题
对下列二叉树进行中序遍历的结果为______。
答案:
ACBDFEHGP
点击查看答案
手机看题
填空题
测试用例包括输入值集和______值集。
答案:
输出
点击查看答案
手机看题
填空题
在深度为7的满二叉树中,度为2的结点个数为______。
答案:
63
点击查看答案
手机看题
填空题
在关系数据库中,用来表示实体之间联系的是______。
答案:
关系
点击查看答案
手机看题
填空题
设有定义:float x=123.4567;,则执行以下语句后的输出结果是______。
printf("%f\n",(int)(x*100+0.5)/100.0);
答案:
123.460000
点击查看答案
手机看题
填空题
软件生命周期可分为多个阶段,一般分为定义阶段、开发阶段和维护阶段。编码和测试属于______阶段。
答案:
开发
点击查看答案
手机看题
填空题
以下程序运行后的输出结果是______。
main()
int x,a=1,b=2,c=3,d=4;
x=(a<B)A:B; X=(A<C)X:C; X=(D>x)x:d;
printf("%d\n",x);
答案:
A
点击查看答案
手机看题
填空题
以下程序的功能是输出如下形式的方阵:
13 14 15 16
9 10 11 12
5 6 7 8
1 2 3 4
请填空。
main()
int i,j,x;
for(j=4; j
(10)
; j--)
for(i=1; i<=4; i++)
x=(j-1)*4 +
(11)
;
printf("M",x);
printf("\n");
答案:
>=1 @>0.
点击查看答案
手机看题
填空题
下列程序中的函数strcpy2()实现字符串两次复制,即将t所指字符串复制两次到s所指内存空间中,合并形成一个新字符串,例如t所指字符串为efgh,调用strcpy2后,s所指字符串为efghefgh,请填空。
#include
#include
void strcpy2(char *s,char *t)
char *p=t;
while(*s++=*t++);
s=
(12)
;
while(
(13)
=*p++);
main()
char str1[100]="abcd",str2[]="efgh";
strcpy2(str1,str2); printf("%s\n",str1);
答案:
s-1.
点击查看答案
手机看题
填空题
以下程序运行后的输出结果是______。
void swap(int x,int y)
int t;
t=x;x=y;y=t;printf("%d%d",x,y);main()
int a=3,b=4;
swap(a,b); printf("%d%d\n",a,b);
答案:
4 3 3 4
点击查看答案
手机看题
填空题
已知字母A的ASCII码为65。以下程序运行后的输出结果是______。
main()
char a, b;
a=’A’+’5’-’3’; b=a+’6’-’2’;
printf("%d %c\n", a, b);
答案:
67 G
点击查看答案
手机看题
填空题
以下程序的功能是输出如下形式的方阵:
13 14 15 16
9 10 11 12
5 6 7 8
1 2 3 4
请填空。
main()
int i,j,x;
for(j=4; j
(10)
; j--)
for(i=1; i<=4; i++)
x=(j-1)*4 +
(11)
;
printf("M",x);
printf("\n");
答案:
i
点击查看答案
手机看题
填空题
下列程序中的函数strcpy2()实现字符串两次复制,即将t所指字符串复制两次到s所指内存空间中,合并形成一个新字符串,例如t所指字符串为efgh,调用strcpy2后,s所指字符串为efghefgh,请填空。
#include
#include
void strcpy2(char *s,char *t)
char *p=t;
while(*s++=*t++);
s=
(12)
;
while(
(13)
=*p++);
main()
char str1[100]="abcd",str2[]="efgh";
strcpy2(str1,str2); printf("%s\n",str1);
答案:
*s++
点击查看答案
手机看题
填空题
以下函数fun的功能是返回str所指字符串中以形参c中字符开头的后续字符串的首地址,例如:str所指字符串为:Hello!,c中的字符为e,则函数返回字符串:ello!的首地址。若str所指字符串为空串或不包含c中的字符,则函数返回NULL。请填空。
char *fun(char *str,char c)
int n=0; char *p=str;
if(p!=NULL)
while(p[n]!=c&&p[n]!=’\0’)n++;
if(p[n]==’\0’) return NULL;
return(______);
答案:
p+n
点击查看答案
手机看题
填空题
下面程序的功能是建立一个有3个结点的单循环链表,如下图所示然后求各个结点数值域data中数据的和,请填空。
#include <stdio.h>
#include
struct NODE
int data;
struct NODE *next;
;
main()
struct NODE *p,*q,*r;
int sum=0;
p=(struct NODE *)malloc(sizeof(struct NODE));
q=(struct NODE *)malloc(sizeof(struct NODE));
r=(struct NODE *)malloc(sizeof(struct NODE));
p->data=100; q->data=200; r->data=300;
p->next=q; q->next=r; r->next=p;
sum=p->data+p->next->data+r->next->next______;
printf("%d\n",sum);
答案:
->next->data
点击查看答案
手机看题
微信扫码免费搜题