1178: 【实验8.1.4指针程序设计】
金币值:2
定数:5
时间限制:1.000 s
内存限制:128 M
正确:13
提交:22
正确率:59.09% 命题人:
题目描述
下列程序的功能是使用字符指针输出字符串。修改程序,保证运行正确。
#include <stdio.h>
#include <string.h>
int main(void)
{
char ch[30]="This is a test of point";
char *p;
p=&ch; /*$ERROR$*/
while(*p!='\n') /*$ERROR$*/
putchar(p++); /*$ERROR$*/
return 0;
}
输出样例 复制
This is a test of point