有如下语句序列: char str[10];ci>>str; 当从键盘输入’’I love this game’’时,str中的字符串是( )。

admin2020-11-11  32

问题 有如下语句序列:
    char str[10];ci>>str;
    当从键盘输入’’I love this game’’时,str中的字符串是(    )。

选项 A、’’I love this game’’
B、’’I love thi’’
C、’’I love’’
D、’’I’’

答案D

解析 由于字符\0作为字符串的结束标志,所以当从键盘上输入“I love this game”时,只把字母I输入字符串s仃。
转载请注明原文地址:https://jikaoti.com/ti/Pul0FFFM
0

相关试题推荐
最新回复(0)