更多"下面程序的输出为()。INTEGERA(10)DATAA/1,2,3,"的相关试题:
[单项选择]阅读下列FORTRAN77程序:INTEGERA(4,4)DATAA/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/WRITE(*,100)F(A93)100FORMAT(1X,F4.1)ENDFUNCTIONF(B,N)INTEGERB(N,N)F=0.0D010K=1,N10F=F+B(K,K)END上述程序运行后,输出结果为()。
A. 19.0
B. 9.0
C. 8.0
D. 18.0
[单项选择]下面程序输出的结果是什么 ( )
public class Quiz2
public static void main(String args[])
try throw new MyException( );
catch(Exception e)
System.out.println("It’s caught!");
finally
System.out.println("It’s finally caught!");
class MyExeeption extends Exception
A. It’s finally caught!
B. It’s caught!
C. It’s caught!/It’sfinally caught!
D. 无输出
[单项选择]下面程序输出的结果是( )。
#include<iostream>
using namespace std;
void main( )
char ch[][8]="good","better","best";
for(int i=1;i<3;++i)
cout<<ch[i]<<endl;
A. good
B. better
C. good
D. good
[单项选择]下面程序输出的结果是
#include<iostream.h>
voidmain( )
inti;
inta[3][3]:1,2,3,4,5,6,7,8,9;
for(i=0;i<3;i++)
cout<<a[2-i][i]<<"";
A. 159
B. 753
C. 357
D. 591
[填空题]下面程序输出的结果是 【11】 。
#include <iostream>
using namespacc std;
class A {
public:
void show( ){tout<<"A!";}
};
class B: public A{
public:
virtual void show( ){cout<<"B!";}
};
class C: public B{
public:
virtual void show( ){cout<<"C!";}
};
void show_info(A *i){i->show( );}
void main( ){
A ia;B ib;C ic;show_info(&ia); show_info(&ib);show_info(&ic);
}
[填空题]下面程序输出的结果是 【10】 。
#include <iostream>
using namespace std;
class A {
public:
virtual void show( ) {cout<<"A!";
};
class B: public A {
public:
void show( ) {cout << "B!";}
};
class C: public B{
public:
void show( ){cout << "C!";}
};
void show_info(A &i) {i. show( );}
void main( ) {
A ia; B ib; C ic; show_info(ia);show_info(ib); show_info(ic); }
[单项选择]阅读下列FORTRAN77程序:INTEGERA(4,5)上述程序运行后,输出的M值为()。
A. 8
B. 9
C. 10
D. 11
E. ND
[单项选择]下面程序的输出为( )。
public class Test
public static void main (String args[])
int x,y;
x=1;
y=2;
System.out.println("The output is"+x+y);
A. The output is xy
B. The output is 3
C. The output is 12
D. The output is x=1 y=2
[单项选择]执行下面程序后输出的正确结果是
public class Test
public static void main(String args[])
System.out.print(100%3);
System.out.print(",");
System.out.print(100%3.0);
A. 1,1
B. 1,1.0
C. 1.0,1
D. 1.0,1.0
[单项选择]下面的程序输出结果是( )。
#define U 5
#define V U+1
#define W V*V/2
main( )
printf("%d ",W);
printf("%d",5*W);
A. 18 72
B. 10.5 52.5
C. 10.5 25.5
D. 10 30
[单项选择]下面程序的输出结果是( )。
#include<iostream>
using namespace std;
void main( )
char cl='a',c2='c';
cout.put('a').put('c').put('/n');
cout.put(c1).put(c2);
A. ac
B. ac
C. a
D. a
[填空题]下面程序的输出结果是 【8】 。
#include <iostream>
using namespace std;
int x;
void funA(int&,int);
void funB(int,int&);
int main( )
{
int first;
int second=5;
x=6;
funA(first,second);
funB(first,second);
cout<<first<<" "<<second<<" "<<x<<endl;
return 0;
}
void funA(int &a,int b)
{
int first;
first=a+b;
a=2*b;
b=first+4;
}
void funB(int u,int &v)
{
int second;
second=x;
v=second+4;
x=u+v;
}
[单项选择]下面程序段的输出结果为
public class Test
public static void main(String args[])
boolean a,b,c;
a=(3<5);
b=(a==true);
System.out.println("a="+a+"b="+b);
c=(b==false);
System.out.println("b="+b+"c="+c);
A. a=true b=false
B. a=true b=false
C. a=true b=true
D. a=false b=false
[单项选择]下面程序段的输出结果是( )。 publicclassTest{ publicstaticvoidmain(Stringargs[]){ intx,y; x=(int)Math.sqrt(5)/2+(int)Math.random( )*5/2; Y=(int)Math.sqrt(3)/2+(int)Math.random( )*3/2; if(x>y) System.out.println9"x>y"); elseif(x==y) System.out.println("x=y"); else System.out.println("x<y"); } }
A. x>y
B. x=y
C. x<y
D. 编译错误
[单项选择]下面程序的输出是______。
Private Sub Command1_Click( )
Print 7/3
End Sub
A. 3.5
B. 7
C. 3
D. 2
[填空题]下面程序的输出结果是 【7】 。
# include <stdio.h>
main( )
staic char b[]="Goodbye";
char * chp = &b [7];
while(- - chp>=&b[0])putchar (* chp);
printf("/n");
[单项选择]下面程序段的输出结果是
class Test
public static void main(String args[])
MyThread t=new MyThread( );
t.displayOutput("t has been createD) ");
t.start( );
class MyThread extends Thread
public void displayOutput(String s)
System.out.println(s);
public void run( )
displayOutput("t is running.");
A. t has been created.
B. t has been created.
C. t is running.
D. 编译出错
[填空题]下面程序的输出结果是______。
#include<iostream.h>
void main( )
inta[6]=1,2,3,4,5,6;
for(int i=0;i<5;i++)
cout<<a[i]<<““;
cout<<endl;
[填空题]下面程序的输出结果为 【10】 。
#include<iostream.h>
f(int a)
{int b=0;
static int c=3;
b++; c++;
return(a+ b+ c);
}
void main( )
{int a=2,i;
for(i=0;i<3;i++)
cout<<f(a)<<end1;
}