#include "stdafx.h"
#include
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char s[] = "012345678", *p = s;
cout << "s:"<
cout<<"-------------------"<
char s1[] = "012345678";
p = s1;
cout << endl << "s1:"<
cout << "*p = " << *p <
cout << "*p = " << *p <
cout << "*p = " << *p <
cout << "*p = " << *p <
cout << "*p = " << *p <
return 0;
}
输出:
s:012345678
*p++ = 3, *(p++) = 3, (*p)++ = 2, *++p = 4, *(++p) = 4, ++*p = 4, ++(*p) = 4
-------------------
s1:012345678
*p = 0
*p++ = 0
*p = 1
*(p++) = 1
*p = 2
(*p)++ = 2
*p = 3
*++p = 3
*p = 3
*(++p) = 4
*p = 4
++*p = 5
*p = 5
++(*p) = 6
-------------------
请按任意键继续. . .



