还是指针
#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[])
{
char c[5]="work";
const char *p=c;
printf("%s\n",c); //输出work
printf("%s\n",p); //输出work
p="lish";
printf("%s\n",c); //输出work
printf("%s\n",p); //输出lish
getchar();
return 0;
}
下面输出应该是两个lish吧,咋字符串c里面的值没有改动,难道p又指向一个新的地址?