单项选择题

下面程序的输出结果是( )。
func(int X)
static int a=2;
return (a+=X);
main()
int b=2,c=4,d;
d=func(b);
d=func(c);
printf("%d\n",d);

A.4
B.6
C.8
D.12