填空题以下程序的输出结果是 【18】 。 void fun() static int a=0; a+=2;printf("%d",a); main() int cc; for(cc=1;cc<4;cc++)fun(); printf("/n");
填空题以下程序运行后的输出结果是 【15】 。 main() char a[]="Language",b[]="Programe"; char,p1,*p2; int k; p1=a,p2=b; for(k=0;k<=7;k++) if*(p1+k)==*(p2+k))printf("%c",*(p1+k));
填空题以下函数rotate的功能是:将a所指N行N列的二维数组中的最后一行放到b所指二维数组的第0列中,把a所指二维数组中的第0行放到b所指二维数组的最后一列中,b所指二维数组中其他数据不变。 #define N 4 void rotade(int a[][N],int b[1[N]) int i,j; for(i=0;i<N;i++) b[i][N-1]= (12) ; (13) =a[N-1][i];
填空题下面程序的功能:输出100以内能被3整除且个位数为6的所有整数,请补充完整。 main() int i,j; for(i=0; 【12】 ;i++) j=i*10+6; if( 【13】 )continue; printf("%d",j);
填空题有以下语句段
int nl=10,n2=20;
printf("______",n1,n2);
要求按以下格式输出n1和n2的值,每个输出行从第一列开始,请填空。
n1=10
n2=20
填空题设循环队列的容量为55,如果头指针front=50(指向队头元素的前一位置),尾指针rear=15(指向队尾),则该循环队列中共有______个元素。
填空题下面的程序是将从终端读入的20个字符放入字符数组中,然后利用指针变量输出上述字符串,请填空。
#include<stdio.h>
main()
{ int i;
char s[21],*p;
for(i=0;i<20;i++)
s[i]=getehar();
s[i]={{U}} 【6】 {{/U}};
p={{U}} 【7】 {{/U}};
while(*p) putchar({{U}} 【8】 {{/U}});
}
填空题下列给定程序中,函数fun()的功能是:从N个字符串中找出最长的那个中,并将其地址作为函数值返回。各字符串在主函数中输入,并放入一个字符串数组中。 请改正程序中的错误,使它能得出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: #include <string.h> #include <stdio.h> #define N 5 #define M 81 /*************found**************/ fun(char (*sq) [N]) int i; char *sp; sp=sq[0]; fori=0;i<N;i++) if(strlen(sp)<strlen(sq[i])) sp=sq[i]; /*************found**************/ return sq; main () char str[N][M], *longest; int i; printf("Enter %d lines:/n ",N); for(i=0;i<N;i++) gets(str[i]); printf("/nThe %d string :/n ",N); for(i=0;i<N;i++) puts(str[i]); longest=fun(str); printf("/nThe longest string :/n "); puts(longest);
填空题以下程序运行后输出结果是U 【11】 /U。
#include
void fun(int x)
{ if(x/5>0) fun(x/5);
printf("\%dn",x);
}
main()
{ fun(11); printf("\n"); }
填空题软件维护活动包括以下几类:改正性维护、适应性维护、{{U}} 【5】 {{/U}}维护和预防性维护。
填空题设当前盘为A盘,当前系统提示符为“>”在不改变当前盘情况下,显示C盘的当前目录路径,应使用命令 【3】 。
填空题在结构化分析使用的数据流图(DFD)中,利用{{U}} 【5】 {{/U}}对其中的图形元素进行确切解释。
填空题若有以下程序 int f(int x,int y) return(y-x)*x; main() int a=3,b=4,c=5,d; d=f(f(3,4),f(3,5)); ptintf("%d/n",D) ; 执行后输出结果是______。
填空题有以下程序(说明:字符0的ASCII码值为48)
#include<stdio.h>
main()
{ char C1, C2;
scanf("%d", &c1);
c2=c1+9;
printf("%c%c/n", c1, c2);
}
若程序运行时从键盘输入48<回车>,则输出结果为______。
填空题下面程序的输出是 【9】 main() enum ememl=3,em2=1,em3; char*aa[]="AA',"BB","CC","DD" printf("%s%s%/n",aa[em1],aa[em2],aa[em3]);
填空题下程序的输出结果是{{U}} 【20】 {{/U}}。
# include<stdio.h>
# define MAX_COUNT4
void fun( )
main( )
{ int count;
for(count=1;count<=MAX_COUNT;coun+ +)fun( );
}
void fun( )
{ staic int i;
i + =2;
printf(”%d,i);
}
填空题下列程序的输出结果是______。 # define p(a) printf("%d,",(int)(a)) # define PRINT(a) p(a); printf("the end") main() int i,a=0; for(i=1;i<5;i++) PRINT(a+i); printf("/n");
填空题请补充函数fun(),该函数的功能是:返回字符数组中指定子符的个数,指定字符从键盘输入。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
#include <stdio.h>
#define N 80
int fun (char s[],char ch)
{
int i=0, n=0;
while({{U}} {{U}} {{/U}} {{/U}})
{
if({{U}} {{U}} {{/U}} {{/U}})
n++;
i++;
}
{{U}} {{U}} {{/U}} {{/U}};
}
main ( )
{
int n;
char str[N], ch;
clrscr ();
printf ("/nInput a string: /n");
gets (str);
printf ("/nInput a charactor: /n" ;
scanf ("%c",
n=fun (str, ch);
printf("/nnumber of %c:%d", ch, n);
}
填空题以下程序的输出结果是{{U}} 【18】 {{/U}}。
#include<stdlib.h>
main()
{ char *s1,*s2,m;
s1=s2=(char*)malloc(sizeof(char));
*s1=15; *s2=20; m=*s1+*s2;
printf("%d/n",m);
}
填空题以下程序运行后的输出结果是{{U}} 【8】 {{/U}}。
main( )
{ int p[7]={11,13,14,15,16,17,18};
int i=0,j=0;
while(i<7
printf("%d/n",j);
}
