关于以下程序,下列说法中正确的是 module Mux21 (a,b,s,y); input a,b; input s; output y; reg y; always @(a or b or s) if (!s) y = a; else y = b; endmoduleA.每当a或b或s生变化时,将执行always模块内语句B.a,b可以被定义为wire型C.该程序输出的表达式为y=(~s)a+sbD.y可以被定义为wire型

关于以下程序,下列说法中正确的是 module Mux21 (a,b,s,y); input a,b; input s; output y; reg y; always @(a or b or s) if (!s) y = a; else y = b; endmodule

A.每当a或b或s生变化时,将执行always模块内语句

B.a,b可以被定义为wire型

C.该程序输出的表达式为y=(~s)a+sb

D.y可以被定义为wire型


参考答案和解析
begin end 块内的语句是顺序执行的;该程序的功能是四选一选择器;当输入为 sel = 11 时,输出为 in3

相关考题:

若有定义 :char *x="abcdefghi"; ,以下选项中正确运用了 strcpy 函数的是A)char y[10]; strcpy(y,x[4]);B)char y[10]; strcpy(++y,x[1]);C)char y[10],*s; strcpy(s=y+5,x);D)char y[10],*s; strcpy(s=y+1,x+1);

边际储蓄倾向的公式是( )。 A.APC=C/Y B.APS=S/Y C.MPS=△S/△Y D.MPC=△C/△Y

若有定义:char *x="abcdefghi";,以下选项中正确运用了strcpy函数的是______。A.char y[10]; strcpy(y,x[4]);B.char y[10]; strcpy(++y,x[1]);C.char y[10],*s; strcpy(s=y+5,x);D.char y[10],*s; strcpy(s=y+1,x+1);

以下程序的执行结果是______。 inelude class Sample { public: int x; int y; void 以下程序的执行结果是______。inelude<iostream.h>class Sample{public:int x;int y;void disp( ){cout<<"x="<<x<<",y="<<y<<endl;}};void main( ){int Sample::*pc;Sample s;pc=Sample::x;s.*pc=10;pc=Sample::y;s.*pc=20;s.disp( );}

下列程序的运行结果是【】。 include class Sample {int x,y;public:Sample() {x=y=0 下列程序的运行结果是【 】。include <iostream. h>class Sample {int x,y;public:Sample() {x=y=0; }Sample(int a, int b) {x=a;y=b;}void disp() {cout<<" x=" <<x<<" , y="<<y<<end1;}};void main() {Sample s1, s2(1, 2);s1. disp0;s2. disp ();}

以下程序的执行结果是【 】。 include class Sample { public: int x: int y; void di 以下程序的执行结果是【 】。include<iostream. h>class Sample{public:int x:int y;void disp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){int Sample:: ** pc;Sample s;pc= Sample: :x;s.*pc=10;pc:=Sample: :y;s.*pc=20;s.disp();}

以下程序的执行后,x和y的值是 ______ 。 include class Sample { public: int x; 以下程序的执行后,x和y的值是 ______ 。 #include <iostream. h> class Sample { public: int x; int y; void disp() { cout<<"x="<<x<<", y="<<y<<end1; } }; void main() int Sample: :*pc; Sample s; pc=Sample:: x; s. *pc=10; pc=Sample: :y; s. *pc=.20; s. disp ();A.x=10, y=20B.x=20, y=10C.x=10, y=10D.x=20, y=20

下列程序的执行结果是()。 includeclass Sample{ int x,y; public: Sample() {x=y=0 下列程序的执行结果是( )。 #include<iostream.h> class Sample { int x,y; public: Sample() {x=y=0;} Sample(int a,int b) {x=a;y=b;} ~Sample() { if(x==y) cout<<"x=y"<<end1; else cout<<"x!=y"<<end1; } void disp() { cout<<"x="<<x<<",y="<<y<<end1; } }; void main() { Sample s1(2,3); s1.disp(); }A.x=2,y=2B.x=3,y:3C.x=2,y=3D.x=3,y=2

若有如下语句: struct a { char x[10] int y; }s,*t; t=S; 则对结构体变量s中的成员y的正确引用是( )。A.a.y;B.t->y;C.t.y;D.*t->y;

有以下程序:include using namespace std;class sample{private: int x; static int 有以下程序:#include <iostream>using namespace std;class sample{private: int x; static int y;public: sample(int a); static void print(sample s);};sample:: sample(int a){ x=a; y+=x;}void sample:: print(sample s){ cout<<"x="<<s. x<<",y="<<y<<end1;}int sample:: y=0;int main(){ sample s1(10); sample s2(20); sample:: print(s2); return 0;}程序运行后的输出结果是( )。A.x=10,y=20B.x=20,y=30C.x=30,y=20D.x=30,y=30

以下程序的输出结果是_______。includemain(){char*a="abcdefghi";int k;fun(a) ;puts 以下程序的输出结果是_______。 #include<string.h> main() {char*a="abcdefghi";int k; fun(a) ;puts(a) ; } fun(char *s) { int x,y; char c; for(x=0,y=strlen(s)-1; x<y; x++,y--) { c=s[y]; s[y]=s[x];s[x]=c;} }A.ihgfedcbaB.abcdefghiC.abcdedcbaD.ihgfefghi

运行下列程序: x=Input Box("input value Of x”) Select Case x Case IsO y=y+1 Case Is=0 y=x+2 Case Else y=x+3 End Select Print x;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

下列程序的输出结果是______。#includemain(){ char *a="abcdefghi";int k; fun(a);puts(a);}fun(char*s){ int x,y;char c; for(x=0,y=strlen(s)-1;x<y;x++,y--) { c=s[y];s[y]=s[x];s[x]=c;}}A.ihgfsdcbaB.abcdcfghiC.abcdedebaD.ihgfefghi

有以下程序:include void swap(char * x,ehar * y){ char t;t= *x; *x: *y; *y=t;main 有以下程序:#include <stdio.h>void swap(char * x,ehar * y){ char t; t= *x; *x: *y; *y=t;main ( ){ char *s1 ="abc", * s2 ="123"; swap(s1 ,s2); printf("%s,%s \n" ,s1 ,s2);}程序执行后的输出结果是( )。A.123,abeB.abe,123C.1bc,a23D.321,cba

以下程序的输出结果是______。 include main() { char*a="abcdefghi";int k fun(a);p 以下程序的输出结果是______。 #include <string.h> main() { char*a="abcdefghi";int k fun(a);puts(a); } fun(char*s) { int x,y; char c for(x=0,y=strlen(s)-1;x<y:x++,y--) {c=s[y];s[y]=s[x];s[x]=c;} }A.ihgfedcbaB.abcdefghiC.abcdedebaD.ihgfefghi

请阅读下面的代码class A{int x;static int y;void fac(String s){System.out.println(“字符串:”+s);}}下列选项中描述正确的是() A.x , y和s 都是成员变量B.x 是实例变量,y是类变量,s是局部变量C.x和y是实例变量,s是参数D.x ,y和s都是实例变量

下列选项中,不属于开放经济中的宏观经济总需求的有A.Y=C+I+G+XB.Y=C+S+T+NXC.Y=C+S+T+XD.Y=C+I+G+NXE.Y=C+S+T+M

超筋梁破坏时,受拉钢筋应变εs和压区边缘混凝土应变εc的关系为(  )。A.εs>εy,εc=εcuB.εs<εy,εc=εcuC.εs<εy,εs>εcuD.εs>εy,εc>εcu

设计下列伪程序的语句覆盖测试用例。 BEGIN INPUT(A,B,C) IF A5 THEN X=10 ELSE X=1 END IF IF B10 THEN Y=20 ELSE Y=2 END IF IF C15 THEN Z=30 ELSE Z=3 END IF PRINT(X,Y,Z) END

以下FX2N可编程序控制器程序实现的是()功能。A、Y0通5S,断2SB、Y0通2S,断5SC、Y0通7S,断2SD、Y0通2S,断7S

S舱促销票价区间调整如下:S1*介于()之间,S2*介于Y75(不含)至Y60(含)之间,S3*为Y60以下。A、Y50以下B、Y65%以下C、Y99至Y75(含)D、Y99至Y70(含)

超筋梁破坏时,钢筋应变与混凝土应变的关系是()。A、εsεy,εc=εuB、εs=εy,εcεuC、εsεy,εc≥εuD、εsεy,εc=εu

有以下程序  void swap(Char *x,Char *y)      {Char t;     t=*x;*x=*y;*y=t;      }   main( )  {Char *s1=”abc”,*s2=”123”;      swap(sl,s2);  printf(”%s,%s/n”,s1,s2);     }  程序执行后的输出结果是()A、abe,123B、123,abcC、321,cbaD、1bc,a23

较常用的时间数列分析模型是()A、Y=T+C+S+IB、Y+T+(C·S·I)C、Y=T·C·S+ID、Y=T·C·S·I

下列选项中,不属于开放经济中的宏观经济总需求的有()。A、Y=C+I+G+XB、Y=C+S+T+NXC、Y=C+S+T+XD、Y=C+I+G+NXE、Y=C+S+T+M

以下FX2N可编程序控制器程序实现的是()功能。A、Y0延时10S接通,延时10S断开B、Y0延时10S接通,延时15S断开C、Y0延时5S接通,延时5S断开D、Y0延时10S接通,延时5S断开

传递函数式可以写成如下的()形式。A、Y(S)=G(S)X(S)B、G(S)=Y(S)X(S)C、Y(S)=G(S)/X(S)D、G(S)=Y(S)/X(S)

单选题超筋梁破坏时,钢筋应变与混凝土应变的关系是()。Aεsεy,εc=εu,Bεs=εy,εcεuCεsεy,εs≥εy