9.Which expression in following statements is not correct?(
来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/08/20 02:04:18
9.Which expression in following statements is not correct?( )
A.char str[10]; str="string";
B.char str[ ]="string";
C.char *p="string";
D.char *p; p="string";
请说明原因谢谢
12.Which is the output result of the following program code( )
char s[ ]="student";
printf(“%s%d”,s+3,sizeof(s));
A.student7 B. dent7 C.dent8 D.student8
这题答案是什么呢
A.char str[10]; str="string";
B.char str[ ]="string";
C.char *p="string";
D.char *p; p="string";
请说明原因谢谢
12.Which is the output result of the following program code( )
char s[ ]="student";
printf(“%s%d”,s+3,sizeof(s));
A.student7 B. dent7 C.dent8 D.student8
这题答案是什么呢
9.char str[10];这个定义系统分配了一个连续的存储空间给数组,str是一个数组名,是数组的首地址,数组的首地址分配了就不会改变了,所以str就是一个常量指针了,就不能再继续赋值了.至于B答案,那是因为没有给数组分配存储空间,而只是一个声明,就相当于一个指针.
答案是C.
s是字符串的首地址指向的是s,而是s+3指向的是d,所以输出的是dent,遇到了字符串结束字符就结束了.
sizeof()求的是字符串所占的字节数,字符串"student"其实是"student\0"共8个字符.
答案是C.
s是字符串的首地址指向的是s,而是s+3指向的是d,所以输出的是dent,遇到了字符串结束字符就结束了.
sizeof()求的是字符串所占的字节数,字符串"student"其实是"student\0"共8个字符.
Which of the following statements is correct?
Which of the following is Not Correct?
Which of the following statements is true?
Which of the following statements is true
which of the following is correct in a Lewis diagram!?
一道英语阅读题目which of the following statements is NOT TRUE?
which of following statements about the Nobel Prize is not t
帮我做道题Which of the following statements is NOT true according
Which of the following statements is Not true according to t
Which of the following statements is not true about St.Augus
1.Which of the following statements about language is NOT tr
Which of the following sentences is correct?