有以下程序#include<stdi0.h>void fun(int n,int*p)(int f1,f2;if(n==1|| n==2)*p=1;else
有以下程序
#include<stdi0.h>
void fun(int 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",s);
}
程序的运行结果是()。
A.2
B.3
C.4
D.5