填空题

源程序文档化要求程序应加注释。注释一般分为序言性注释和 【3】 。

【参考答案】

功能性注释
<上一题 目录 下一题>
热门 试题

单项选择题
若有如下程序: sub(int *t,int a[3][4]) int m,n; for(m=0;m<3;m++) for(n=0;n<4;n++) *t=a[m][n];t++; main() int*t,s[3][4)=1,2,3),4,5,6),7,8,9; t=(int*)malloc(50); sub(t,s); printf( %d,%d n ,t[4],t[7]); 则程序运行后的输出结果是( )。
A.4,7
B.4,0
C.5,8
D.程序错误
单项选择题
以下程序中函数scmp的功能是返回形参指针s1和s2所指字符串中较小字符串的首地址: #include <stdio.h> #include <string.h> char *scmp (char *S1,char *s2) if(strcmp(s1,s2)<0) return(s1); else return(s2); main() int i; char string[20],str[3] [20]; for(i=0;i<3;i++) gets(str[i]); strcpy(string,scmp(str[0],str[1])); *库函数strcpy对字符串进行复制* strcpy(string,scmp(string,str[2])); printf( %s n ,string); 若运行时依次输入abed、abba和abc三个字符串,则输出结果为( )。
A.abed
B.abba
C.abc
D.abca
相关试题
  • 如果调用fopen函数不成功,则函数返回 【...
  • 用以下语句调用库函数malloc,使字符指针st...
  • 以下程序的功能是求下列算式中A、B、C的值...
  • 以下程序的输出结果为 【13】 。 #de...
  • 下面程序的功能是用来统计文件中字符个数。...