仔细阅读下面程序,请给出运行结果( )。#include#includeint f1(int x){return x*x;}int f2(int x){return x*x*x;}main( ){int x=3,y1,y2,y3,y4;int(*f)( );f=f1;y1=(*f)(x);y2=f1(x);f=f2;y3=f(x);y4=f2(x);printf(“y1=%d,y2=%d,y3=%d,y4=%d\n”,y1,y2,y3,y4);}
Ay1=9,y2=9,y3=27,y4=27
By1=3,y2=9,y3=27,y4=9
Cy1=3,y2=3,y3=9,y4=9
Dy1=3,y2=9,y3=9,y4=27
相关试题
-
int x=3,y1,y2,y3,y4;int(*f)( );f=f1;y1=(*f)(x);y2=f1(x);f=f2;y3=f(x);y4=f2(x);printf(“y1=%d,y2=%d,y3
-
return a*a*a;}void main( ){int x=3,y1,y2,y3,y4;f=f1;y1=(*f)(x);y2=f1(x);f=f2;y3=f(x);y4=f2(x);printf
-
; return n; } int f2(int n) { printf(f2:); return n*n-4; } int f3(int n)
-
有以下程序 #include fun(int n, int *s) { int f1, f2; if(n==1||n==2) *s=1; else { fun(n-1, &f1); fun(n-2,
-
(单选题)三菱PLC中Y0、Y1、Y2、Y3公用的COM端为?•