for (i = 0; i < 613; i++)
{
for (j = 0; j < 2; j++)
{
printf("[%s]\t", postcodes[i][j]);
printf("\n");
}
}
数组是一个由613个邮政编码组成的标题,附有一个郊区。
char *postcodes[NUM_POSTCODES][2] =
{
{ "7000", "Glebe" },
{ "7000", "Hobart" },
{ "7000", "Mount Stuart" },
{ "7000", "North Hobart" },
{ "7000", "West Hobart" },
{ "7001", "Hobart" },
{ "7002", "North Hobart" },
{ "7004", "Battery Point" },
...
}
当程序运行时,它将在邮政编码7248处开始打印,该邮政编码约为数组的一半。我找不到为什么这样做的原因。任何帮助深表感谢。