大家来看看我写的程序为什么不对啊?
输入一串字符串,求它的个数.#include<stdio.h>
void main()
{ char *p;
int length;
printf("Please input your string:\n");
for(length=0;*p=='\0';p++,length++)
*p=getchar();
printf("The number of your string is :%d.\n",length);
getch();
}