char *s;
char buf [] = "This is a test";
s = strchr (buf, 't');
if (s != NULL)
printf ("found a 't' at %s\n", s);
printf("%c\n",*s);
printf("%c\n",*s++);
printf("%c\n",*s++);
printf("%c\n",*s++);
printf("%c\n",*s++);
此代码输出:
found a 't' at test
t
t
e
s
t
Program ended with exit code: 0
在我看来,*s 应该是t
,*s++ 应该是e
. 但是为什么它们在这段代码中具有相同的价值?