单选题
C语言
题号 #1757879
有以下函数
#include sthio.h string.h
main()
{ printf(“%d\n”,strlen”ATS\n012\1”) );}
程序运行后的输出结果是( )。
3
8
4
9
参考答案
B
答案解析
考察转义字符的用法,strlen函数的作用是求得字符串长度,\n与\1均是反义字符各表示一个字符所以打印值为8。
你可能感兴趣的试题
A.thisisacat!
B.this is a
C.thisis a cat!
D.thisisa cat!
A.xyz
B.wxyz
C.zyxw
D.zyx
A.****#????***#
B.***#????*****#
C.**#????*****#
D.****#????*****#