首页 > 职业考试题库1 > 题目详情
有以下程序:#includeiht fun(iht n,int*p){int f
题目内容:
[单选题]有以下程序:includeiht fun(iht n,int*p){int f1,f2;if(n==1||,n==2)*p=1;else{fun(n£有以下程序: #include<stdio.h> iht fun(iht n,int*p) { int f1,f2; if(n==1||,n==2)*p=1; else { fun(n-1,&f1);fun(n-2,&f2); *p=f1+f2; } } main() { int s; fun(3,&s); printf("%d/n",s); } 程序的运行结果是______。
A.2
B.3
C.4
D.5
有以下程序: #include<stdio.h> iht fun(iht n,int*p) { int f1,f2; if(n==1||,n==2)*p=1; else { fun(n-1,&f1);fun(n-2,&f2); *p=f1+f2; } } main() { int s; fun(3,&s); printf("%d/n",s); } 程序的运行结果是______。
A.2
B.3
C.4
D.5
本题链接: