填空题执行以下程序后的输出结果是 【6】 。 main() int a=10; a=(3*5,a+4); printf("a=%d/n",a);
填空题以下程序运行后的输出结果是 【13】 。 #include <stdio.h> main( ) int a,b,c; a =25;b =025;e =0x25; prinff("%d %d %d/n",a,h,c);
填空题以下程序的输出结果是{{U}} 【12】 {{/U}}。
main()
{ char *p=“abodefgh”,*r;
long *q;
q=(long*)p;
q++;
r=(char*)q;
printf(“%s/n”,r);
}
填空题以下程序运行后的输出结果是______。 main() char a[]="123456Y89",*p; int i=0; p=a; while(*p) if(i%2=0) *p='*'; p++;i++; puts(a);
填空题计算机软件分为系统软件和应用软件,UNIX系统属于{{U}} 【4】 {{/U}} 。
填空题请补充main函数,该函数的功能是求方程ax2+bx+c=0的两个实数根。方程的系数a、b、c从键盘输入,如果判别式 (disc=b2-4ac)小于0,则要求重新输入a、b、c的值。 例如,当a=1,b=2,c=1时,方程的两个根分别是x1=-1.00, x2=-1.00。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。 试题程序: #include"math.h" #include <stdio.h> main() float a,b,C,disc,X1,x2; clrscr(); do printf("Input a,b,C:"); scanf("%f,%f,%f",&a,&b,ac); disc=b*b-4*a*c; if(disc<0) printf("disc=%f/n Input again! /n",disc); while( 【1】 ); printf("****+* the result *+*****/n"); x1= 【2】 ; x2= 【3】 ; printf("/nx1=%6.2f/nx2=%6.2f/n",x1/x2);
填空题以下程序中,for循环体执行的次数是 {{U}} 【13】 {{/U}} 。
#define N 2
#define M N+1
#define K M+1*M/2
main( )
{ int i;
for(i=1;i〈 K;i++)
{ ... }
...
}
填空题请补充main函数,该函数的功能是:输出一个NXN矩阵,要求非周边元素赋值0,周边元素赋值1。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在 main函数的横线上填入所编写的若干表达式或语句。 试题程序: #include<stdio .h> #define N 10 main() int bb[N] IN]; iht i,j,n; clrscr 0; printf (" /nInput n: /n"); scanf ("%d", for (i=0; i<n; i++ ) for (j=0; j<n; j++) if(【1】) bb[i] [j]=l; else 【2】; printf(" /n*** the result *** /n"); for (i=0; i<n; i++) printf (" /n/n"); for (j=0; j<n; j++) printf ("%4d",bb [i] [j ] );
填空题下列给定程序中,函数fun的功能是:计算整数n的阶乘。 请改正程序中的错误,使它能得出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: #include<stdlib.h> #include<stdio.h> double fun(int n) double result=1.0; while(n>1&&n<170) /*********found************/ result*=--n; /***********found*********/ Return; voidmain() int n; system("CLS"); printf("Enter an integer:"); scanf("%d",&n); printf("/n/n%d!=%1d/n/n",n,fun(n));
填空题下列程序的功能是:求出ss所指字符串中指定字符的个数,并返回此值。例如,若输入字符串123412132,指定字符1,则输出3。请填空。 #include<conio.h> #include<stdio.h> #define M 81 int fun(char *ss,char c) int i=0; for(;______;ss++) if( *ss==c)i++: return i; main( ) char a[M],ch; printf("/nPlease enter a string:");gets(a); printf("/nPlease enter a char:");ch=getchar( ); prinff("/nThe number of the char is:%d/n",fun(a,ch));
填空题设有以下定义变量的语句,并且已赋确定的值,则表达式“W*X+Z-y”所求得的数据类型为{{U}} {{U}} {{/U}} {{/U}}。
char w;int x;float y;double 2;
填空题给定程序中,函数fun的功能是:将形参s所指字符串中的所有数字字符顺序前移,其他字符顺序后移,处理后新字符串的首地址作为函数值返回。 请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。 注意:部分源程序给出如下。 不得增行或删行,也不得更改程序的结构! 试题程序: #include <stdio.h> #include <string.h> #include <stdlib.h< #include <ctype.h< char *fun(char *s) inti, j, k, n; char *p, *t; n=strlen(s)+1; t=(c har*)malloc (n*sizeof(char)); p=(char*)malloc(n*sizeof(char)); j=0; k=0; for(i=0; i<n; i++) if(isdigit(s[i])) /******************found*******************/ p[ (1) ]=s[i]; j++; else t[k]=s[i]; k++; /******************found*******************/ for(i=0; i< (2) ; i++)p[j+i]=t[i]; p[j+k]=0; /******************found*******************/ return (3) ; main() char s[80]; printf("Please input:"); scanf("%s", s); printf("/nThe result is: %s/n", fun(s));
填空题已知字母A的ASCII码为65。以下程序运行后的输出结果是{{U}} 【11】 {{/U}}。
main()
{ char a,b;
a='A'+'5'-'3';b=a+'6'-'2';
printf("%d %c/n",a,B) ;
}
填空题输出一个数据块到文件中的函数是______,从文件中输入一个数据块的函数是______;输出一个字符串到文件中的函数是______,从文件中输入一个字符串的函数是______。
填空题汉字系统中,字库中的汉字是以______码存在。
填空题软件需求规格说明书应具有完整性、无歧义性、正确性、可验证性、可修复性等特性,其中最重要的是______。
填空题以下程序中函数fun的功能是:构成—个如图所示的带头结点的单向链表,在结点的数据域中放入了具有两个字符的字符串。函数disp的功能是显示输出该单向链表中所有结点中的字符串。请填空完成函数disp。#include<stdio.h>typedefstructnode/*链表结点结构*/{charsub[3];structnode*next;}Node;Nodefun(chars)/*建立链表*/{......}voiddisp(Node*h){Node*p;p=h->next;while({{U}}[19]{{/U}}){printf("%s/n",p->sub);p={{U}}[20]{{/U}};}}main(){Node*hd;hd=fun();disp(hd);printf("/n");}
填空题有以下程序: void f(int v,int w) int t; t=v;v=w;w=t; main() int x=1,y=3,z=2 if(x>y) f(x,y); else if(y>z) f(y,z); else f (x,z); printf("%d,%d,%d//n",x,y,z); 执行后的输出结果是{{U}} {{/U}}。
填空题数据库技术的主要特点为数据的集成性、数据的高{{U}} 【4】 {{/U}}和低冗余性、数据独立性和数据统一管理与控制。
填空题一个项目具有一个项目主管,一个项目主管叫‘管理多个项目,则实体“主管”与实体“”的联系属于______。
