#include <stdio.h>
main()
{
int i = 10;
static int a = i;
if(a==10)
printf("yes 1st comparision is equal\n");
else
printf("no 1st comparision is not equal\n");
if(i==10)
printf("yes 2nd comparision is equal\n");
else
printf("no 2nd comparision is not equal\n");
a=15;
if(a==i)
printf("yes 3rd comparision is equal\n");
else
printf("no 3rd comparision is not equal\n");
}
为什么a
重新初始化为 15,输出是no 3rd comparision is not equal
,而输出应该是yes 3rd comparision is equal
?