考察对指针的了解程度。
struct test{
int i;
int *p;
};
int main()
{
test s;
int *p = &s.i;
p[0] = 1;
p[1] = 2;
s.p = p;
p[1] = 3;
p[0] = 4;
return 0;
}
问运行时会在哪行报错?
原文转自:http://www.ltesting.net