软件维护活动包括以下几类:改正性维护、适应性维护、 【5】 维护和预防性维护。
设Y是int型变量,请写出判断Y为奇数的关系表达式 【6】 。
Y%2=1 或 Y%2!=0
以下程序的输出是 【7】 。
main( )
char str1[]=How do you do",*p=strl;
strcpy(str1+strlen(str1)/2"es she");
pfinff("%s/n",p1);
How does she
以下程序输出的最后个值是 【8】
int ff(int n)
static int f=1;
f=f*n
return f;
main( )
int i;
for(i=1;i<=5:i++) printf("%d、n",ff(i));
下列程序的输出结果是 【9】 。
main( )
int a[]=2,4,6,*prt=&a[0],x=8,y,z;
for(y=0;y<3;y++)
z=(*(ptr+y<x)*(ptr+y):x;
printf("%d/n",z);
若有定义语句char s[100],d[100];int j=0,i=0;且s中已赋字符串,请填空以实现拷贝。 (注:不使用逗号表达式)
whi1e( )s[i])d[j]= 【10】 :j++;
d[j]=0;
若有如下结构体说明:
struct STRU int a,b;charc:double d;
struct STRU*p1,*p2;
请填空,以完成对t数组的定义,t数组的每个元素为该结构体类型。 【11】 t[20]
下面的程序可对指定字符串中的字符串进行从大到小排序,请将程序填完整。 (注:程序采用了冒泡排序法)
#include<stdio.h>
#include<string.h>
main( )
char*str="ABCDabcd",temp;
int n,i;
n=strlen(str);
while(n-->1)
for(i=0;i<n;i++)
if(str[i]<str[i+l])
temp= 【12】 ;
str[i]=str[i+l];
【13】 =temp;
printf( 【14】 );
[AB]str[i]
[AC]str[i+A]
[AD]"%s",str
以下程序段打开文件后,先利用fseek函数将文件位置指针定位在文件末尾,然后调用ftell函数返回当前文件位置指针的具体位置,从而确定文件长度,请填空。
FILE*myf;longfl;
myf= 【15】 ("test.t","rb");
fseek(myf,( ),SEEK_END) fl+ftell(myf);
fclose(myf);
printf("%ld/n",fl);
下面关于算法的叙述中,正确的是( )。
A:算法的执行效率与数据的存储结构无关 B:算法的有穷性是指算法必须能在执行有限个步骤之后终止 C:算法的空间复杂度是指算法程序中指令(或语句)的条数 D:以上三种描述都正确