2007-12-24 16:19:51 +08:00
|
|
|
import stdio;
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
2008-08-30 17:01:14 +08:00
|
|
|
int *addr1;
|
|
|
|
int *addr2;
|
|
|
|
|
2007-12-24 16:19:51 +08:00
|
|
|
int i = 1;
|
2008-08-30 17:01:14 +08:00
|
|
|
printf("%d", i);
|
2007-12-24 16:19:51 +08:00
|
|
|
{
|
|
|
|
int i = 2;
|
2008-08-30 17:01:14 +08:00
|
|
|
printf(";%d", i);
|
|
|
|
addr1 = &i;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
int i = 3;
|
|
|
|
printf(";%d", i);
|
|
|
|
addr2 = &i;
|
2007-12-24 16:19:51 +08:00
|
|
|
}
|
2008-08-30 17:01:14 +08:00
|
|
|
printf(";%d", i);
|
2008-08-30 19:07:44 +08:00
|
|
|
printf(";%s", addr1 == addr2 ? "OK" : "NG");
|
2008-08-30 17:01:14 +08:00
|
|
|
|
|
|
|
puts("");
|
2007-12-24 16:19:51 +08:00
|
|
|
return 0;
|
|
|
|
}
|