再看看下边程序
											#include "stdio.h"
f(char *s)
{char *p=s;
while ( *p!='\0') p++;
return (p-s);
}
main()
{
printf("result:%d\n",f("GHEDG"));
}
答案为什么会是5呢?程序是怎么运行的啊?有请网友帮助并详细给解释下。
#include "stdio.h"
f(char *s)
{char *p=s;
while ( *p!='\0') p++;
return (p-s);
}
main()
{
printf("result:%d\n",f("GHEDG"));
}
答案为什么会是5呢?程序是怎么运行的啊?有请网友帮助并详细给解释下。
 2007-03-15 13:18
	    2007-03-15 13:18
   2007-03-15 13:27
	    2007-03-15 13:27