EX7.18 ?
写出下面程序的运行结果。#include <stdio.h>
int Square(int i)
{
return i * i;
}
int main(void)
{
int i = 0;
i = Square(i);
for ( ; i<3; i++)
{
static int i = 1;
i += Square(i);
printf("%d,", i);
}
printf("%d\n", i);
return 0;
}
A.2,6,42,3 √
B.2,2,2,3
C.2,2,3,3
D.2,3,4,3
页:
[1]