写出下面程序的运行结果______。 import java.io.*: publicClassAbc { public stat
第1题
请写出下面程序的运行结果: public class Test extends TT{ public static void main(String args[] Test t=new Test ("Tom."); } public Test(String s){ super (s); System.out.print("How are you?"); } public Test(){ this("I am Jack."); } } class TT{ public TT(){ System.Out.print ("Hi!"); } public TT(String s){ this (); System.out.print("I am"+s); } } 结果:【 】。
第2题
写出程序运行的结果。
main()
{int i,j,m,n;
i=8;
j=10;
m=++i;
n=j++;
printf("%d,%d,%d,%d,"i,j,m,n);
}
第4题
第5题
第6题
写出以下程序的运行结果。
#include int fun(int a){int b=0;static int c=3;b ; c ;return(a b c);}
main(){int i, a=5;for (i=0; i<3; i )cout<< i<< " "<< fun(a)<< " ";}
第7题
第8题
阅读下列程序并写出程序运行结果。
Private Sub Form_Click()
Dim A(1 To 3) As String
Dim c As Integer
Dim j As Integer
A(1) = "4"
A(2) = "8"
A(3) = "12"
c = 1
For j = 1 To 3
c = c + Val(A(j))
Next j
Print c
End Sub
写出程序运行时单击窗体后,窗体Form1上的结果。
第9题
写出程序运行结果
int sum(int a)
{
auto int c=0;
static int b=3;
c+=1;
b+=2;
return(a+b+C);
}
void main()
{
38
int I;
int a=2;
for(I=0;I<5;I++)
{
printf("%d,", sum(a));
}
}
第10题
def GetList():
return [1,2,3]
def GetElements():
return 1,2,3
print(GetList())
print(GetElements())