单选题阅读下列程序 DIMENSION M(3,3) DATA M/1,2,3,4,5,6,7,8,9/ WRITE(*,100)(M(3,J),J=1,3) 100 FORMAT(1X,3I2) END 程序运行结果是()A 2 5 8B 3 6 9C 4 5 6D 7 8 9
单选题
阅读下列程序 DIMENSION M(3,3) DATA M/1,2,3,4,5,6,7,8,9/ WRITE(*,100)(M(3,J),J=1,3) 100 FORMAT(1X,3I2) END 程序运行结果是()
A
2 5 8
B
3 6 9
C
4 5 6
D
7 8 9
参考解析
解析:
暂无解析
相关考题:
执行下列程序后,输出的结果是()。includedefine S(X)X*Xvoid main(){int a=9,k=3,m=2; 执行下列程序后,输出的结果是( )。 #include<stdio.h> #define S(X)X*X void main() { int a=9,k=3,m=2; a/=S(k+m)/S(k+m); printf("%d",a); }A.(*p) .data.aB.(*p) .a;C.p->data.aD.p.data.a
阅读以下说明和C++程序,将应填(n)处的字句写在对应栏内。[说明]设计一程序,输入10个整数到一个数组中,调整这10个数在数组中的位置,使得其中最小的一个数成为数组的首元素,最大的一个数成为数组的末元素。[C++程序]include <iostream.h>define SIZE 10void main ( ){int data [SIZE];int m;cout<<"请输入"<<SIZE<<"个整数:";for ( m=0;m<SIZE; m++ ) (1);int j=0,k=0;for ( int i=1;i<SIZE; i++ )if ((2)) j=i;else if ( data[i]<data[k] ) (3);if (j>0 ) {int d=data[0];(4);data[k]=d;}if ( k<SIZE-1 ){int d=data [SIZE- 1 ];data[SIZE- 1 ]=data[j];(5);}cout<<end1<<" 排序后: ";for ( m=0;m<SIZE; m++ ) cout<<data[m]<<" " ;}
阅读下列程序说明和C++程序,把应填入其中(n)处的字句,写对应栏内。【说明】下面的程序实现了类String的构造函数、析构函数和赋值函数。已知类String的原型为:class String{public:String(coust char * str = NULL); //普通构造函数String( const String other); //拷贝构造函数~String(void); //析构函数String perate =(const String other); //赋值函数private:char * m_data; // 用于保存字符串};//String 的析构函数String:: ~String (void){(1);}//String 的普通构造函数String: :String( const char * str){if (2){m_data = new char[1];*m_data = '\0';}else{int length = strlen(str);m_data = new ehar[ length + 1 ];strepy(m_data, str);}}//拷贝的构造函数String:: String( const String other){ int length = strlen(other. m_data);m_data = new char[ length + 1 ];strepy(m_data, other, m_data); //赋值函数String String::operate = (eonst String other) //{if (3)return * this;delete [] m_clara; //释放原有的内存资源int length = strlen( other, m_data);m_data = new chart length + 1 ];(4);return (5);}
设有下列定义: struct sk { int m; float x; )dara,*q; 若要使q指向data中的m域,正确的赋值语句是( )。A.q=data.m;B.*q=data.m;C.q=(struct sk*)data.m;D.q=(struct sk*)data.m;
设有下列定义:struct sk{ int m;float x;}data,*q;若要使q指向data中的m域,正确的赋值语句是( )。A.q=data.m;B.*q=data.m;C.q=(struct sk*)data.m;D.q=(struct sk*)data.m;
阅读以下说明和Java程序,将应填入(n)处的字句写在对应栏内。[说明]下面程序实现十进制向其它进制的转换。[Java程序]ClasS Node{int data;Node next;}class Transform{private Node top;public void print(){Node p;while(top!=null){P=top;if(P.data>9)System.out.print((char)(P.data+55));elseSystem.out.print(p.data);top=p.next;}}public void Trans(int d,int i){//d为数字;i为进制int m;(1) n=false;Node p;while(d>0){(2);d=d/i;p=new Node();if( (3) ){p.data=m;(4);top=P;n=true;}else{p.data=m;(5);top=P;}}}}
A)(仕兰微面试题目)#i ncludevoid testf(int*p){*p+=1;}main(){int *n,m[2];n=m;m[0]=1;m[1]=8;testf(n);printf("Data v alue is %d ",*n);}------------------------------B)#i ncludevoid testf(int**p){*p+=1;}main(){int *n,m[2];n=m;m[0]=1;m[1]=8;testf(n);printf(Data v alue is %d",*n);}下面的结果是程序A还是程序B的?Data v alue is 8那么另一段程序的结果是什么?
阅读下列FORTRAN程序:DIMENSION M(6)READ(*,*)MDO 10 J=l,6 DO 10 K=J,6 IF(M(K)LTM(J))THEN N=M(K)M(K)=M(J)M(J)=N END IF 10 CONTINUEWRITE(*,100)(M(I),I=1,6)100 FORMAT(2X,614)END键盘输入10,7,9,2,1,3;程序运行后的输出结果是:A. 1 2 3 7 9 10B. 10 9 7 3 2 1C. 7 9 2 1 3 10D. 3 1 2 9 7 10
阅读FORTRAN程序:DIMENSION M(4,3)DATE M/-10,12,24,11,20,-15,61,78,93,30,44,-45/N(M(1,1)DO 101=1,4D010J=1,3IF(M(IJ)LT.N)THENN=M(I,J)Kl=lK2=JENDIF10CONTINUEWRITEC*,‘(2X,314),)N,K1,K2程序运行后的输出结果是:A. 93,3,1B.-10,1,1C.-45,4,3D.78,3,2
阅读下列FORTRAN77程序: INTEGER A(4,5) DATA A/5*1,5*2,5*3,5*4/ M=0 DO 10 K=1,4 10 M=M+A(K,K+1) WRITE(*,*)M END 上述程序运行后,输出的M值为( )。A.8B.9C.10D.11
已知顺序数据文件FILE3. DAT有如下数据:50,54,64,6565,70,85,90 46,73,60,72 阅读FORTRAN程序 DIMENSION M(12)OPENdO,FILE=:FILE3. DAT,)READC10,*)(M(I),I=1,12)D0 10J=1,12 IF (M(J).GE. 60)N=N+1 10 CONTINUE WRITE(*,20)N 20 FORMAT(2X,‘N=,,12)END程序输出后的结果是:A.N=7B.N=8C.N=4D. N=9
阅读以下FORTRAN程序 READ(*,*)M,N K=MOD(M,N) 10 IF(K.GT.0)THEN M=N N=K K=MOD(M,N) GOTO 10 END IF WRITE(*,*)N END 若运行以上程序时,由键盘输入25,11,则程序输出为( )。A.3B.2C.1D.0
阅读以下FORTRAN 程序:READ( *,*) MIF (M. LT. 100. AND. M. GT. 999) STOP K=M/100L=(M - K*100)/10 N= M - K* 100 - L* 10 MM= K + N WRITE( * ,,(2X,I3)')MM END键盘输入600,则程序的输出结果是:A. 8 B. 3 C. 7 D. 6
阅读下列FORTRAN 程序: DIMENSION M(6) READ(*,*)M DO 10 J=1,6 DO 10 K=J,6 IF(M(K).LT.M(J))THEN N=M(K) M(K)=M(J) M(J)=N END IF10 CONTINUE WRITE(*,100)(M(I),I=1,6) 100 FORMAT(2X,614) END键盘输入10,7,9,2,1,3;程序运行后的输出结果是:(A)1 2 3 7 9 10 (B)10 9 7 3 2 1(C)7 9 2 1 3 10 (D)3 1 2 9 7 10
阅读以下FORTRAN程序:K1=M(5)K2=M(K1)K3=M(K1)+M(K2)K4=M(K1+K2+K3)WRITE(*,100)K4100 FORMAT(2X;K4;I3)ENDFUNCTION M(N)M=N+1RETURNEND程序输出结果是:(A)K4=28(B)K4=27(C)K4=30(D)K4=29
阅读下列FORTRAN77程序: INTEGER A(3,3) DATA A/1,2,3,4,5,6,7,8,9/ S=0.0 DO 10 I=1,3 J=MOD(I,3)+1 S=S+A(I,J) 10 CONTINUE WRITE(*,*)S END 上述程序运行后,输出的S值为( )。A.150B.120C.180D.240
阅读FORTRAN 程序 DIMENSION M(4,3) DATE M/-10,12,24,11,20,-15,61,78,93,30,44,-45/ N(M(1,1) DO 10I=1,4 DO 10J=1,3 IF (M(I,J).LT.N) THEN N=M(I,J) K1=I K2=J ENDIF10 CONTINUE WRITE(*,’(2x,314)’) N,K1,K2 END程序运行后的输出结果是:(A)93,3,1 (B)-10,1,1(C)-45,4,3 (D)78,3,2
执行下列程序后,输出结果为:DATAI,M,N/2,1,41110M=M*II=I+1IF(I.GT.N)GOTO20GOTO1020WRITE(*,*)MEND()A、6B、24C、120D、720
有如下程序,程序执行完后的结果是(). Dimension m(3) X="123456" for i=1 to 3 m(i)=SUBSTR(X,2*I,1) endfor ? M(1),M(2),M(3)A、2 4B、2 3 4C、2 4 6D、1 2 3 4
有程序:INTEGERM(3,3)DATAM/1,2,3,4,5,6,7,8,9/DO10I=1.3DO10J=1,3K=M(I,J)M(I,J)=M(J,I)M(J,I)=K10CONTINUEWRITE(*,100)((M(I,J),J=1,3),I=1,3)100FORMAT(1x,3I2)END此程序执行后的结果为:()A、1;4;7;2;5;8;3;6;9B、1;2;3;4;5;6;7;8;9C、9;6;3;8;5;2;7;4;1D、7;8;9;4;5;6;1;2;3
单选题阅读下列程序 CHARACTER A*4,B*5,C*4 DATA A,B,C/’BIG’,’MIDDLE’,’SMALL’/ WRITE(*,20)A,B,C 20 FORMAT(1X,A2,A3,A4) END 程序运行结果是()A BIGMIDDLEB *********C BIGMIDSMAD BIMIDSMAL
单选题有如下程序,程序执行完后的结果是(). Dimension m(3) X="123456" for i=1 to 3 m(i)=SUBSTR(X,2*I,1) endfor ? M(1),M(2),M(3)A2 4B2 3 4C2 4 6D1 2 3 4
单选题阅读下列程序 FUN(c,d)=a*c+b/d DATA a,b/1.0,1.0/ WRITE(*,’(F4.1)’) FUN(a,b)-FUN(b,a) END 程序运行结果是()A 0.0B 4.0C 2.OD 3.O
单选题阅读下列程序 INTEGER M(3,3) DATA M/1,2,3,4,5,6,7,8,9/ WRITE(*,10)(M(3,J),J=1,3) 10 FORMAT(1X,3I2) END 程序运行结果是()A2 5 8B3 6 9C4 5 6D7 8 9
单选题You need to meet the business requirements of the packaging department. What should you do?()AAdd the ProductSize data table and the ProductSizeDescriptor column to the Product dimension. Set the order of the ProductSKU attribute to the ProductSizeDescriptor column.BAdd the ProductSize data table as a dimension and then add this dimension to the cube as a Referenced dimension. Set the order of the key attribute of the ProductSize dimension to the ProductSizeDescriptor column.CAdd the ProductSize data table and the ProductSizeDescriptor column to the Product dimension. Create a user-defined hierarchy that has ProductSKU as the top-level attribute and ProductSizeDescriptor as the bottom-level attribute.DAdd the ProductSize data table as a dimension and then add this dimension to the cube as a Referenced dimension. Create a user-defined hierarchy within the ProductSize dimension. Set the ProductSizeDescriptor attribute as the top-level attribute.
单选题阅读下列程序 N=0 DO 10 K=1,3 N =N+1 M=K*N 10 CONTINUE WRITE(*,’(1X,2I3)’)M,K END 程序运行结果是()A 9 4B 9 3C 12 4D 12 3(#^)