二级C语言10练习(字符串含答案).pdfVIP

  • 31
  • 0
  • 约2.63千字
  • 约 3页
  • 2020-09-11 发布于河北
  • 举报
(1)下列语句中,正确的是 A) char *s ; s= ”Olympic ”; B) char s[7] ; s= ”Olympic ”; C) char *s ; s={ ”Olympic ”}; D) char s[7] ; s={ ”Olympic ”}; 2) 以下程序的输出结果是 9 。 #include string.h main() { printf(%d\n,strlen(IBM\n012\1\\)); } 3) 以下程序的输出结果是 54 。 #include string.h main() { char a[]={\1, \2, \3, \4, \0}; printf(%d %d\n,sizeof(a),strlen(a)); } 4) 有以下程序 main() { char s[]={ aeiou },*ps; ps=s; printf(%c\n,*ps+4); } 程序运行后的输出结果是 A)a B)e C)u D) 元素 s[4]

文档评论(0)

1亿VIP精品文档

相关文档