sum = $1 , rmul = $2 , k = $3
int mul();
int k = 5;
void main(){
int i, rmul, sum = 0;
for( i = 0 ; i < 5 ; i++ ) {
int k = 10; sum += 2; rmul = mul(); k++;
}
printf("sum =%d, mul =%d, k =%d\n",sum,rmul, k);
}
int mul() {
static int mul = 1;
mul += mul; return(mul);
}
參考書籍:旗標無痛學習教本