[課業] 國考課業相關問題,非歷屆考題的討論,如學理觀念的釐清。
#include<stdio.h>
int bar (int value) {
static int tmp =0;
tmp++; value++; return value + tmp;}
void main(){
int x=5; printf("%d\n", bar(x));
printf("%d\n", bar(bar(x)));}
value的變化 5,5,8,12
輸出 5,8,12
請問有人明白呢?
100年地特統計組 資料處理科
--
All Comments