网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
根据程序描述的逻辑功能,下列说法正确的有: module Learn7_1(clk,CLR,LD,out); input clk,CLR,LD,data; output reg[3:0] out; always@(posedge clk or negedge CLR) begin if(!CLR) out<=0; else if(!LD) out<=data; else out<=out+1; end endmodule
A.同步清零,同步置数
B.同步清零,异步置数
C.异步清零,同步置数
D.异步清零,异步置数
参考答案和解析
软件测试的目的就是证明程序的正确性,即给定特定的输入,通过运行被测程序,检查程序的输出是否与预期结果一致,进而验证程序的正确性。
更多 “根据程序描述的逻辑功能,下列说法正确的有: module Learn7_1(clk,CLR,LD,out); input clk,CLR,LD,data; output reg[3:0] out; always@(posedge clk or negedge CLR) begin if(!CLR) out<=0; else if(!LD) out<=data; else out<=out+1; end endmoduleA.同步清零,同步置数B.同步清零,异步置数C.异步清零,同步置数D.异步清零,异步置数” 相关考题
考题
下列代码中if(x>0){System.out.println("first");} else if(x>-3)(System.out.println("second");} else{ System.out.println("third");}要求打印字符串为"second"时,x的取值范围是A.x<=0 并且 x>-3B.x>0C.x>-3D.x<=-3
考题
( 18 )阅读下面代码if(x==0){System.out.println(" 冠军 ");}else if (x-3){System.out.println(" 亚军 ");}else { System.out.println(" 季军 ");}若要求打印字符串 “ 季军 ” ,则变量 x 的取值范围是A ) x=0 x=-3B ) x0C ) x-3D ) x=-3
考题
给出下面程序段if(x>0){System.out.println“Hello.“;}elseif(x>-3){System.out.println“Nicetomeetyou“;}else{System.out.println“Howareyou“;}若打印字符串“Howareyou”,则x的取值范围是()。
A.x>0B.x>-3C.xD.x-3
考题
publicstaticvoidmain(String[]args){Stringstr=null?;if(str==null){System.out.println(”null”);}else(str.length()==0){System.out.println(”zero”);}else{System.out.println(”some”);}}Whatistheresult?()
A.nullB.zeroC.someD.Compilationfails.E.Anexceptionisthrownatruntime.
考题
Giventhefollowingcode:if(x0){System.out.println(first);}elseif(x-3){System.out.println(second);}else{System.out.println(third);}Whichrangeofxvaluewouldprintthestringsecond?()A.x0B.x-3C.x=-3D.x=0x-3
考题
publicvoidfoo(booleana,booleanb){if(a){System.out.println(A”);}elseif(ab){System.out.println(AB”);}else{17.if(!b){System.out.println(notB”);}else{System.out.println(ELSE”);}}}Whatiscorrect?()A.Ifaistrueandbistruethentheoutputis“AB”.B.Ifaistrueandbisfalsethentheoutputis“notB”.C.Ifaisfalseandbistruethentheoutputis“ELSE”.D.Ifaisfalseandbisfalsethentheoutputis“ELSE”.
考题
执行下面程序后输出的正确结果是( )。 public class Test{ public static void main(String args[]){ System.out.print(100%3); System.out.print(","); System.out.print(100%0); } }A.1,1B.1,1.0C.1.0, lD.1.0,1.0
考题
有如下程序段 if(x<0){System.out.println("first");} else if(x<-4){System.out.println("second");} else{System.out.println("third");} x的取值在( )范围内时,将打印出字符串"second"。A.x>0B.x>-4C.x<=-4D.x<=0 &&x>-4
考题
有如下程序段: if(x>0){ System.out. println("first");} else if(x>-4){ System.out.println("second");} else { System.out.println("third");}x的取值在什么范围内时,将打印出字符串 "second" ?A.x>0B.x>-4C.x<= -4D.x<= 0x> -4
考题
给出下面程序段: if(x>0){System.out.printlh("Hello. ");} else if(x>-3){System.out.println("Nice to meet you!");} else{System.out.println("How are you?");} 若打印字符串"How are you?",则x的取值范围是A.x>0B.x>-3C.x<=-3D.x<=0x>-3
考题
写异步D触发器的verilog module。(扬智电子笔试) module dff8(clk , reset, d, q); input clk;
写异步D触发器的verilog module。(扬智电子笔试)module dff8(clk , reset, d, q);input clk;input reset;input [7:0] d;output [7:0] q;reg [7:0] q;always @ (posedge clk or posedge reset)if(reset)q = 0;elseq = d;endmodule
考题
下列代码中 d(x>0)(System.out.Pdntln("first");} else if(x>-3){System.out.pnntln("second");} else{System.out.pdlldn("third");)要求打印字符串为"second"时,x的取值范围是( )。A.x<=0并且x>-3B.x>OC.x>-3D.x<=-3
考题
给出下列代码片断: if(x>0) {System.out.println("first");} else if(x>-3){System.out.println("second");} else{System.out.println("third");} 请问x处于什么范围时将打印字符串“second”?( )A.x>0B.x>-3C.x<=3D.x<=0x>-3
考题
给出下列代码片段: if(x>0){System.out.println("first");} else if(x>-3){System.out.println("second");} else{System.out.println("third");} 当x处于( )范围时打印字符串"second"。A.x>0B.x>-3C.-3<x<=0D.x<=-3
考题
public void foo( boolean a, boolean b ){ if( a ) { System.out.println( “A” ); } else if ( a b ) { System.out.println( “AB” ); } else { 17. if ( !b ) { System.out.println( “notB” ); } else { System.out.println( “ELSE” ); } } } What is correct?() A、 If a is true and b is true then the output is “AB”.B、 If a is true and b is false then the output is “notB”.C、 If a is false and b is true then the output is “ELSE”.D、 If a is false and b is false then the output is “ELSE”.
考题
8253—5工作于方式3时,当写入控制字CW和许数初值后,()开始减l计数过程。A、输出OUT高电平后,再经过一个CLK下降沿B、经过一个CLK上升沿C、输出OUT变为低电平后,再经过一个CLK下降沿D、经过一个CLK下降沿
考题
Given the following code: if (x0) { System.out.println("first"); } else if (x-3) { System.out.println("second"); } else { System.out.println("third"); } Which range of x value would print the string "second"?() A、 x 0B、 x -3C、 x = -3D、 x = 0 x -3
考题
public static void main(String[]args){ String str="null"; if(str==null){ System.out.println("null"); }else(str.length()==0){ System.out.println("zero"); }else{ System.out.println("some"); } } What is the result?()A、nullB、zeroC、someD、Compilationfails.E、Anexceptionisthrownatruntime.
考题
单选题public void foo( boolean a, boolean b ){ if( a ) { System.out.println( “A” ); } else if ( a b ) { System.out.println( “AB” ); } else { 17. if ( !b ) { System.out.println( “notB” ); } else { System.out.println( “ELSE” ); } } } What is correct?()A
If a is true and b is true then the output is “AB”.B
If a is true and b is false then the output is “notB”.C
If a is false and b is true then the output is “ELSE”.D
If a is false and b is false then the output is “ELSE”.
考题
单选题8253—5工作于方式3时,当写入控制字CW和许数初值后,()开始减l计数过程。A
输出OUT高电平后,再经过一个CLK下降沿B
经过一个CLK上升沿C
输出OUT变为低电平后,再经过一个CLK下降沿D
经过一个CLK下降沿
考题
单选题Given the following code: if (x0) { System.out.println("first"); } else if (x-3) { System.out.println("second"); } else { System.out.println("third"); } Which range of x value would print the string "second"?()A
x 0B
x -3C
x = -3D
x = 0 x -3
考题
单选题public static void main(String[]args){ String str="null"; if(str==null){ System.out.println("null"); }else(str.length()==0){ System.out.println("zero"); }else{ System.out.println("some"); } } What is the result?()A
nullB
zeroC
someD
Compilationfails.E
Anexceptionisthrownatruntime.
热门标签
最新试卷