《CPrimerPlus》第六版第十一章编程练习答案.docxVIP

  • 75
  • 0
  • 约9.53千字
  • 约 19页
  • 2017-05-03 发布于重庆
  • 举报

《CPrimerPlus》第六版第十一章编程练习答案.docx

《CPrimerPlus》第六版第十一章编程练习答案

1 #includestdio.h #includestring.h #define SIZE 100 void input(char *, int ); int main(void) { char arr[SIZE]; int n; puts(input the number of n:); scanf(%d, n); getchar(); puts(input your string: ); input(arr, n); printf(%s\n, arr); getchar(); return 0; } void input(char *Arr, int len) { int i; for (i=0; ilen; i++) { *(Arr+i)=getchar(); } *(Arr+i)=\0; while(getchar() !=\n) { continue; } } 2. #includestdio.h #includestring.h #define SIZE 100 void input(char *, int ); int main(void) { char arr[SIZE]; int n; puts(input the number of n:); scanf(%d, n); getchar(); put

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档