利用数组处理批量数据幻灯片课件.pptVIP

  • 4
  • 0
  • 约9.77千字
  • 约 92页
  • 2019-11-30 发布于天津
  • 举报
2. gets函数----输入字符串的函数 其一般形式为: gets(字符数组) 作用是输入一个字符串到字符数组 char str[20]; gets(str); Computer↙ 6.3.6 善于使用字符串处理函数 3. strcat函数----字符串连接函数 其一般形式为: strcat(字符数组1,字符数组2) 其作用是把两个字符串连接起来,把字符串2接到字符串1的后面,结果放在字符数组1中 6.3.6 善于使用字符串处理函数 使用字符串函数时,在程序开头用#include string.h 3. strcat函数----字符串连接函数 char str1[30]=”People”; char str2[]=”China”; printf(”%s”, strcat(str1,str2)); 输出:PeopleChina 6.3.6 善于使用字符串处理函数 要足够大 a[0][0] a[0][1] a[0][2] a[0][3] a[1][0] a[1][1] a[1][2] a[1][3] a[2][0] a[2][1] a[2][2] a[2][3] a[0] a[1] a[2] a[0][0] a[0][1] a[0][2] a[0][3] a[1][0] a[1][1] a[1][2] a[1][3] a[2][0]

文档评论(0)

1亿VIP精品文档

相关文档