网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下面是32位乘加器(乘法加法器),请将以下程序片段的序号填入空格。 A. Y B. input [31:0] C. OV D. output reg E. * module mac(__________A, input [31:0] B, input [31:0] C, output reg [31:0] ___, _________ OV // 乘加溢出 ); always @* {___,Y} = A ____ B + C; endmodule


参考答案和解析
C
更多 “下面是32位乘加器(乘法加法器),请将以下程序片段的序号填入空格。 A. Y B. input [31:0] C. OV D. output reg E. * module mac(__________A, input [31:0] B, input [31:0] C, output reg [31:0] ___, _________ OV // 乘加溢出 ); always @* {___,Y} = A ____ B + C; endmodule” 相关考题
考题 有下列程序 program test(input,output); var s:integer; ch:char; count:array[‘a‘..‘z‘]of integer; begin for ch:=‘a‘to‘z‘do count[ch]:=0; read(ch); while not eoln do begin if(ch>=‘a‘)and(chx[5])and(x[c]/c0) or not(x[a+b]>(a+b))的值是( )。AtrueBfalseC0D1

考题 以下程序:fun(intx,inty,intz){z=x*x+y*y;}main(){inta=31;fun(5,2,a);printf(“%d”,a);}程序的输出结果是() A、0B、29C、31D、无定值

考题 ● 给定C 语言程序:int foo( int x, int y, int d){if( x != 0 ) {if ( y == 0 ) d = d / x;else d = d / (x * y );} else {if( y == 0 ) d = 0;else d = d / y;}return d ;}当用路径覆盖法进行测试时,至少需要设计 (31) 个测试用例。(31)A. 3 B. 4 C. 5 D. 8

考题 给定C语言程序:int foo(int x, int y,int d){if ( x !=0 ) {if ( y == 0 ) d = d / x;else d=d/(x*y);} else {if ( y == 0 ) d = 0;else d=d/y;}return d;}当用路径覆盖法进行测试时,至少需要设计(31)个测试用例。A.3B.4C.5D.8

考题 阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。【说明】设计一个日期类Date包括年、月、日等私有数据成员。要求实现日期的基本运算,如某日期加上天数、某日期减去天数、两日期相差的天数等。在Date类中设计如下重载运算符函数:Date operator + (int days) : 返回某日期加上天数得到的日期。Date operator - (int days) : 返回某日期减去天数得到的日期。int operator - (Dateb): 返回两日期相差的天数。【程序】include<iostream.h>int day tab[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},{31,29,31,30,31,30,31,31,30,31,30,31}};//day_tab二维数组存放各月天数,第一行对应非闰年,第二行对应闰年class Date{int year, month, day //年,月,日int leap(int); //判断是否闰年int dton(Date)Date ntod(int)public:Date() { }Date (int y, int mint d) I year = y; month = m; day = d;}void setday(intd){day = d;}void setmonth(int m) {month = m;}void setyear(int y) {year =y;}int getday() {return day;}int getmonth() {return month:}int getyear() {return yea;}Date operator + (int days) //+运算符重载函数{static Date date;int number =(1)date = ntod(number)return date}Date operator - (int days) //-运算符重载函数{staffs Date date;int number=(2);number - = days;date = ntod(number)return date;}int operator - (Date b) //-运算符重载函数{int days=(3);return days;}void disp(){cout<<year<<"."<<month<<". "<<day<<endl;}};int Date: :leap( int year)if((4)) //是闰年return 1; //不是闰年elsereturn0:}int Date:: dton( Date d) //求从公元0年0月0日到d日期的天数{inty,m,days =0;for(y=1;y<=d. year;y++)if((5))days+ =366; //闰年时加366天else days + = 365; //非闰年时加365天for(m =0;m<d. month-1;m++)if((6))days += day_tab[1] [m];elsedays +=day_tab[0] [m];days + = d. day;return days;}Date Date::ntod(intn) //将从元0年0月0日的天数转换成日期{int y=1,m = 1,d,rest = n,lp;while(1){ if(leap(y))if(rest<= 366) break;else rest - = 366;else //非闰年if(rest = 365 ) break;else rest-=365;

考题 以下程序的输出结果是 ( ) fun (int x,int y, int z) { z=x * x+y * y;} main( ) { int a=31; fun(5,2,a); print{("%d",a); }A.0B.29C.31D.无定值

考题 以下程序的输出结果是______。 fun(int x, int Y, int z) { z=x*x+y*y;} main() { int a=31; fun(5, 2, a); printf("% d", a); }A.0B.29C.31D.无定值

考题 写异步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

考题 下图所示为一个32×32阵列的存储器。A9~A5从00000、00001逐步递增至11111时分别使X0、X1直至X31有效,A4~A0从00000、00001逐步递增至11111时分别使Y0、Y1直至Y31有效。为了选中存储单元(31,1),A9~A5应为11111,A4~A0应为【 】。

考题 运行下列程序: 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

考题 有如下程序 x=InputBox("input value of x") Select Case x Case Is0 y=y+l Case Is=0 y=x+2 Case Else y=x+3 End Select. Print x: y 运行时,从键盘输入—5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 以下程序的输出结果是(48)。 fun(int x, int y, int z){ z=x*x+y*y;} main(){ int a=31; fun(5,2,a); printf("%d",a); }A.0B.29C.31D.无定值

考题 运行下列程序: x=InputBox("input value of x") Select Case X Case Is>0 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

考题 An administrator is installing AIX 6.1 on a new LPAR and the boot sequence has stalled with reference code 0c31.What is the most likely cause?() A.The system is waiting for user input to define console type lft0.B.The system is waiting for user input to define console type tty0.C.The system is waiting for user input to define console type vty0.D.The system is waiting for user input to define console type vsa0.

考题 有如下程序: x = InputBox("Input value of x") Select Case x Case Is > 0 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

考题 以下程序的输出结果是( )。include fun(int x,int y,int z) { z=x*x+y*y;} main() { int a=31; fun(5,2,a); printf("%d",a);} A、0B、29C、31D、无定值

考题 阅读以下C++代码,填充(1)~(5)的空缺,将解答填入答题纸的对应栏内。 【说明】在下面程序横线处填上适当的字句,使其输出结果为:x=5x=6y=7x=8z=9【程序】#include<iostream.h>class X1{int x;(1):X1(int xx=0){x=xx;}(2)void Output()(cout<<"x="<<x<<end;}};(3)Y1:public X1{int y;public:Y1(int xx=0,int yy=0):X1(xx){y=yy;}(2)void Output(){(4)Output();cout<<"y="<<y<<end1;}};class Z1:pubtic X1{int z:(5):Z1(int xx=0,int zz=0):X1(xx){z=zz;}②void Output(){X1::Output();cout<<"z="<<z<<end1;}};void main(){X1 a(5);Y1 b(6,7);Z1 c(8,9);X1*p[3]={For(int i=0;i<3;i++){p[i]-->Output();cout<<end1;}}

考题 逻辑覆盖法是设计白盒测试用例的主要方法之一,通过对程序逻辑结构的遍历实现程序的覆盖。针对以下由C语言编写的程序,按要求回答问题。 int XOR(char * filename,unsigned long key){ FILE * input = NULL , *output =NULL; //i char * outfilename = NULL; int len = strlen(filename); unsigned char buffer; if( (filename[len-2] == '.') //4 strcpy(outfilename, filename); outfilename[len-2] = '\0'; } else{ //5 outfilename = new char[len+5]; strcpy(outfilename, filename); strncat(outfilename,".c",2); } input =fopen(filename,"rb"); if( input == NULL) { //6 cout << "Error opening file " << filename << endl; //7 delete [] outfilename; outfilename = NULL; return 1; } output =fopen(outfilename,"wb"); if( output == NULL ) { //8 cout << "Error creating output file " << outfilename << endl; //9 delete [] outfilename; outfilename = NULL; return 1; } while( ! feof(input) ) { //10 if(fread( //13 outfilename = NULL; fclose(input); fclose(output); return 1; } } else{ //14 buffer ^= key; fwrite( } } fclose(input); //15 fclose(output); delete [] outfilename; return 0; } 请给出满足100%DC(判定覆盖)所需的逻辑条件。

考题 阅读下列说明,回答问题。 【说明】 逻辑覆盖法是设计白盒测试用例的主要方法之一,通过对程序逻辑结构的遍历实现程序的覆盖。针对以下由C语言编写的程序,按要求回答问题。 int XOR(char * filename,unsigned long key){ FILE * input = NULL , *output =NULL; //i char * outfilename = NULL; int len = strlen(filename); unsigned char buffer; if( (filename[len-2] == '.') //4 strcpy(outfilename, filename); outfilename[len-2] = '\0'; } else{ //5 outfilename = new char[len+5]; strcpy(outfilename, filename); strncat(outfilename,".c",2); } input =fopen(filename,"rb"); if( input == NULL) { //6 cout << "Error opening file " << filename << endl; //7 delete [] outfilename; outfilename = NULL; return 1; } output =fopen(outfilename,"wb"); if( output == NULL ) { //8 cout << "Error creating output file " << outfilename << endl; //9 delete [] outfilename; outfilename = NULL; return 1; } while( ! feof(input) ) { //10 if(fread( //13 outfilename = NULL; fclose(input); fclose(output); return 1; } } else{ //14 buffer ^= key; fwrite( } } fclose(input); //15 fclose(output); delete [] outfilename; return 0; } 请画出上述程序的控制流图,并计算其控制流图的环路复杂度VG.

考题 逻辑覆盖法是设计白盒测试用例的主要方法之一,通过对程序逻辑结构的遍历实现程序的覆盖。针对以下由C语言编写的程序,按要求回答问题。 阅读下列说明,回答问题。 【说明】 逻辑覆盖法是设计白盒测试用例的主要方法之一,通过对程序逻辑结构的遍历实现程序的覆盖。针对以下由C语言编写的程序,按要求回答问题。 int XOR(char * filename, unsignedlong key){ FILE * input = NULL , *output =NULL; //i char * outfilename = NULL; int len = strlen(filename); unsigned char buffer; if( (filename[len-2] == '.') //4 strcpy(outfilename, filename); outfilename[len-2] = '\0'; } else{ //5 outfilename = new char[len+5]; strcpy(outfilename, filename); strncat(outfilename,".c",2); } input =fopen(filename,"rb"); if( input == NULL) { //6 cout << "Error opening file " << filename << endl; //7 delete [] outfilename; outfilename = NULL; return 1; } output =fopen(outfilename,"wb"); if( output == NULL ) { //8 cout << "Error creating output file " << outfilename << endl; //9 delete [] outfilename; outfilename = NULL; return 1; } while( ! feof(input) ) { //10 if(fread( //13 outfilename = NULL; fclose(input); fclose(output); return 1; } } else{ //14 buffer ^= key; fwrite( } } fclose(input); //15 fclose(output); delete [] outfilename; return 0; } 请给出问题2中控制流图的线性无关路径。

考题 阅读下列说明,回答问题。 【说明】 逻辑覆盖法是设计白盒测试用例的主要方法之一,通过对程序逻辑结构的遍历实现程序的覆盖。针对以下由C语言编写的程序,按要求回答问题。 int XOR(char * filename, unsigned long key){ FILE * input = NULL , *output = NULL; //1 char * outfilename = NULL; int len = strlen(filename); unsigned char buffer; if( (filename[len-2] == '.') //4 strcpy(outfilename, filename); outfilename[len-2] = '\0'; } else{ //5 outfilename = new char[len+5]; strcpy(outfilename, filename); strncat(outfilename,".c",2); } input = fopen(filename,"rb"); if( input == NULL) { //6 cout << "Error opening file " << filename << endl; //7 delete [] outfilename; outfilename = NULL; return 1; } output = fopen(outfilename,"wb"); if( output == NULL ) { //8 cout << "Error creating output file " << outfilename << endl; //9 delete [] outfilename; outfilename = NULL; return 1; } while( ! feof(input) ) { //10 if( fread( //13 outfilename = NULL; fclose(input); fclose(output); return 1; } } else{ //14 buffer ^= key; fwrite( } } fclose(input); //15 fclose(output); delete [] outfilename; return 0; }4.1、请给出满足100%DC(判定覆盖)所需的逻辑条件。(3分)4.2、请画出上述程序的控制流图,并计算其控制流图的环路复杂度V(G)。(7分)4.3、请给出问题2中控制流图的线性无关路径。(5分)

考题 P,Q,R都是4bit的输入矢量,下面哪一种表达形式是正确的()A、input P[3:0],Q,R;B、input P,Q,R[3:0];C、input P[3:0],Q[3:0],R[3:0];D、input [3:0] P,[3:0]Q,[0:3]R;E、input [3:0] P,Q,R;

考题 7360 show port(nt-a:xfp:1)后得到如下反馈Traffic Statistics =============================================================================== Input Output ------------------------------------------------------------------------------- Octets 0 0 Packets 0 0 Errors 0 0 以下说法正确的是:()A、Input代表下行方向流量B、Input代表上行方向流量C、Output代表下行方向流量D、Output代表上行方向流量

考题 An administrator is installing AIX 6.1 on a new LPAR and the boot sequence has stalled with reference code 0c31. What is the most likely cause?()A、The system is waiting for user input to define console type lft0.B、The system is waiting for user input to define console type tty0.C、The system is waiting for user input to define console type vty0.D、The system is waiting for user input to define console type vsa0.

考题 在自动驾驶的诊断页面中有哪些方式?A、INPUT,OUTPUT,DIAGNOSTICSB、INPUT,REPORT,DIAGNOSTICSC、REPORT OUTPUT DIAGNOSTICSD、REPORT,INPUT,OUTPUT

考题 单选题What is the result?()A  The output is X = 6 y = 0B  The output is x = 7 y = 0C  The output is x = 6 y = -1D  The output is x = 7 y = -1E  Compilation will fail.

考题 单选题An administrator is installing AIX 6.1 on a new LPAR and the boot sequence has stalled with reference code 0c31. What is the most likely cause?()A The system is waiting for user input to define console type lft0.B The system is waiting for user input to define console type tty0.C The system is waiting for user input to define console type vty0.D The system is waiting for user input to define console type vsa0.

考题 单选题Operational amplifiers, used primarily in analog circuits, are characterized by()A high input impedance, high gain and low output impedanceB high input impedance, high gain and high output impedanceC low input impedance, low gain and high output impedanceD low input impedance, high gain and low output impedance