下面程序的输出结果【9】 。main (){enum team {y1=4,y2,y3};printf ("%d",y3);}
下面程序的输出结果【9】 。
main ()
{enum team {y1=4,y2,y3};
printf ("%d",y3);}
相关考题:
下面的程序使用了函数指针,其运行结果是______。#include<stdio.h>#include<math.h>int f1(int a){return a*a;}int f2(int a){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("y1=%d,y2=%d,y3=%d,y4=%d\n",y1,y2,y3,y4);}A.y1=27,y2=9,y3=9,y4=27B.y1=9,y2=9,y3=27,y4=27C.y1=9,y2=27,y3=9,y4=27D.y1=27,y2=27,y3=9,y4=9
仔细阅读下面程序,请给出运行结果( )。#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);}A.y1=9,y2=9,y3=27,y4=27B.y1=3,y2=9,y3=27,y4=9C.y1=3,y2=3,y3=9,y4=9D.y1=3,y2=9,y3=9,y4=27
运行以下程序,则在图形窗口中可以看到()条曲线。 x=0:0.1:10; y1=sin(x); y2=5*sin(x); y3=[10*sin(x);20*sin(x)]; plot(x,y1,x,y2,x,y3)A.3B.4C.5D.6
3、第4题博弈树对应的策略式表述,如下表所示 参与人2 (a,c) (a,d) (b,c) (b,d) 参与人1 M -1,-2 -1,-2 x1, y1 x2, y2 N x3,y3 x4,y4 0, 2 1,1 该博弈双矩阵表述的支付值,正确的是()A.(x1,y1) = (2, 0), (x2,y2) = (2,0), (x3,y3)= (0,2), (x4,y4) = (1,1)B.(x1,y1) = (-1, -2), (x2,y2) = (-1,-2), (x3,y3)= (0,2), (x4,y4) = (1,1)C.(x1,y1) = (0, 2), (x2,y2) = (0,2), (x3,y3)= (2,0), (x4,y4) = (2,0)D.(x1,y1) = (0, 2), (x2,y2) = (0,2), (x3,y3)= (2,0), (x4,y4) = (2,0)
【单选题】下面程序的输出是。 main() {enum team {my,your=4,his,her=his+10}; printf("%d%d%d%dn",my,your,his,her);}A.0 1 2 3B.0 4 0 10C.0 4 5 15D.l 4 5 15
分别用红、绿、蓝三种颜色在同一个图形窗口绘制下列函数在区间[-pi, pi]的图形,y=sin(x),y=cos(x),y=tan(x).A.clear x=-pi:0.1:pi; y1=sin(x); y2=cos(x); y3=tan(x); plot(x,y1,'r',x,y2,'g',x,y3,'b')#B.clear x=-pi:0.1:pi; y1=sin(x); plot(x,y1,'r') y2=cos(x); plot(x,y2,'g') y3=tan(x); plot(x,y3,'b')#C.clear x=-pi:0.1:pi; y1=sin(x); plot(x,y1,'r') hold on y2=cos(x); plot(x,y2,'g') y3=tan(x); plot(x,y3,'b')#D.clear x=-pi:0.1:pi; y1=sin(x); plot(x,y1,'r') y2=cos(x); plot(x,y2,'g') y3=tan(x); plot(x,y3,'b')#E.clear x=-pi:0.1:pi;
第4题博弈树对应的策略式表述,如下表所示 参与人2 (a,c) (a,d) (b,c) (b,d) 参与人1 M -1,-2 -1,-2 x1, y1 x2, y2 N x3,y3 x4,y4 0, 2 1,1 该博弈双矩阵表述的支付值,正确的是()A.(x1,y1) = (2, 0), (x2,y2) = (2,0), (x3,y3)= (0,2), (x4,y4) = (1,1)B.(x1,y1) = (-1, -2), (x2,y2) = (-1,-2), (x3,y3)= (0,2), (x4,y4) = (1,1)C.(x1,y1) = (0, 2), (x2,y2) = (0,2), (x3,y3)= (2,0), (x4,y4) = (2,0)D.(x1,y1) = (0, 2), (x2,y2) = (0,2), (x3,y3)= (2,0), (x4,y4) = (2,0)