单选题 C语言
题号 #1552983


 
 

进入在线模考

参考答案

A

答案解析

本题涉及字符数组和指针两个知识点;①在C语言中,字符数组在存放字符串时会自动在末尾加上。\O’,所以题中数组str有11个元素;②ptr指向数组str的首地址,ptr+10 是指向str[10],*(ptr+lO)是引用str[10]的值(即结束符'\0')。

你可能感兴趣的试题

A.if(*s1==*s2) puts("they are Equal");
B.if(!strcmp(s1,s2)) puts("they are Equal");
C.if(s1==s2) puts("they are Equal");
D.if(strcmp(s1,s2))  puts("they are Equal");
找试题 · 找答案 · 找资料 在线模考