#include <stdio.h>
int fun1(); /*function one declaration*/
int fun2(); /*functino two declaration*/
void main()
{
int i;
for (i = 1; i <= 5; i++)
{
printf("fun1()=%2d,",fun1());/*call function one*/
printf("fun2()=%2d\n",fun2());/*call function two*/
}
}
/*-------------define function one----------------*/
int fun1()
{
auto int y = 10; /*define the auto variable y*/
y += 1;
return y;
}
/*--------------define function two---------------*/
int fun2()
{
static int z = 60;/*define the static variable z*/
z += 1;
return z;
转载于:https://my.oschina.net/u/241930/blog/403417