#include <stdio.h>
void incx(void)
{
int nx = 0;
printf("nx=%d\t", ++nx);
return;
}
void incy(void)
{
static int ny = 0;
printf("ny=%d\n", ++ny);
return;
}
int main(void)
{
incx();
incy();
incx();
incy();
incx();
incy();
return 0;
}
标签:return,变量,ny,静态,incy,void,局部变量,nx,incx From: https://blog.51cto.com/u_16336886/8561199