林军主编《C语言程序设计》课后参考答案第一二章.docVIP

  • 3
  • 0
  • 约1.6千字
  • 约 6页
  • 2016-08-10 发布于重庆
  • 举报

林军主编《C语言程序设计》课后参考答案第一二章.doc

林军主编《C语言程序设计》课后参考答案第一二章

习题七 填空题 1.\0 2一组(.多个)相同类型数据 多组相同类型数据 3. gets puts 4.字符串所含有字符的个数 5.586 单项选择题 1.B 2.B 3.A 4.D 程序填空题 1.(1)gets(temp) (2)strcpy(temp,s); 2.(1)i10 (2)if(strcmp(a[p],a[j])0) p=j; (3)p!=j 3.(1)a[i][j]= 0 a[i][j]= 9 (2)a[i][m]=a[i][m+1] (3)a[i][m]= \0 编程题 1. #include stdio.h #include string.h main() {int i,t; char a[20],c; printf(Enter a string: ); gets(a); printf(\n\nThe string is: %s\n,a); t=strlen(a); for(i=0;it/2;i++) {c=a[i]; a[i]=a[t-1-i]; a[t-1-i]=c;} printf(The new string is: %s\n,a); } 习题八 填空题 1.在定义函数时函数名后面圆括号中的变量名 在主调函数中调用一个函数时,函数名后面圆括号中的参数 2.在一个函数内部定义的变量 在函数之外定义的变量 3.

文档评论(0)

1亿VIP精品文档

相关文档