更多"若下面程序的输出结果是4,请填空。 main( ) int i,"的相关试题:
[填空题]下列程序的输出结果是16.00,请填空。
main( )
int a=9,b=2;
float x= 【9】 ,y=1,1,z;
z=a/2+b*x/y+1/2;
printf("%5.2f/n",z);
[填空题]下列程序的输出结果是16.00,请填空:
main( )
int a=9,b=2;
float x= 【7】 ,y=1.1,z;
z=a/2+b*x/y+1/2;
printf("%5.2f/n",z);
[填空题]下列程序的输出结果是16.00,请填空:
main( )
}
int a=9,b=2;
float x= 【7】 ,y=1.1,z;
z=a/2+b*x/y+1/2;
printf("%5.2f/n",z);
}
[单项选择]下列程序的输出结果是
class Father
int m.n;
Father(int a,int B)
m=a;
n=b
void show ( )
System.out.println("m and n:"+m+" "+n);
class Son extends Father
int p;
Son (int a,int b,int C)
super(a,B) ;
p=c;
void show( )supur.show( );
System.out.println("p:"+p);
class Test
public static void main (String args[ ])
Son s:new Son(6,7,8);
s.show( );
A. m and n:6 8
B. m andn:6 7
C. m and n:7 8
D. m and n:8 7
[单项选择]以下程序的输出结果是( )
int d=1;
fun(int p)
static int d=5;
d+=P:
printf("%d",d );
return(d );
main( )
int am=3;
printf("%d/n",fun(a+fun(d ))):
A. 6 9 9
B. 6 6 9
C. 6 15 15
D. 6 6 15
[填空题]下列程序的输出结果是 【11】 。
int t(int x,int y,int cp,int dp)
{ cp=x* x+y*y;
dp=x*x-y*y;
}
main( )
{ int a=4,b=3,c=5,d=6;
t(a,b,c,d);
printf("%d%d/n",c,d);
}
[单项选择]分析以下程序,执行后的输出结果是 ( )
int f1(int x,int y)
return x>y x:y;
int f2(int x,int y)
return x>y y:x;
main( )
int a=4,b=3,c=5,d,e,f;
d=f1(a,B) ;d=f1(d,C) ;
e=f2(a,B) ;e=f2(e,C) ;
f=a+b+c-d-e;printf("%d,%d,%d",d,f,e);
A. 3,4,5
B. 5,3,4
C. 5,4,3
D. 3,5,4
[单项选择]下面程序段的输出结果是
class Base
int i;
Base( )
add(1);
void add(int v)
i+=v;
void print( )
System.out.println(i);
class Extension extends Base
Extension( )
add(2);
void add(int v)
i+=*2;
public class Test
public static void main(String args[])
bogo(new Extension( ));
static void bogo(Base b)
b.add(8);
b.print( );
A. 9
B. 18
C. 20
D. 22
[填空题]下列程序的输出结果是 【11】 。
int t(int x,int y,int cp,int dp)
cp=x* x+y*y;
dp=x*x-y*y;
main( )
int a=4,b=3,c=5,d=6;
t(a,b,c,d);
printf("%d%d/n",c,d);
[填空题]下列程序的输出结果是 【11】 。
int t(int x,int y,int cp,int dp)
cp=x*x+y*y;
dp=x*x-y*y;
main( )
int a=4,b=3,c=5,d=6;
t(a,b,c,D) ;
print f("%d%d/n",c,D) ;
[单项选择]以下程序执行后的输出结果是
fun(int x,int y)
static int m=0,1=2;
i+=m+1;m=i+x+y;return m;
main( )
int j=1,m=1,k;
k= fun(j,m);printf("%d,",k);
k= fun(j,m);printf("%d/n",k);
A. 5,5
B. 5,11
C. 11,11
D. 11,5