下列程序的输出结果是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 p:7B.m andn:6 7 p:8C.m and n:7 8 p:6D.m and n:8 7 p:6

下列程序的输出结果是

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 p:7

B.m andn:6 7 p:8

C.m and n:7 8 p:6

D.m and n:8 7 p:6


相关考题:

下列程序的运行结果是()。includevoid fun (int *a,int*b){int*kk=a;a=b;b=k}void 下列程序的运行结果是( )。 #include< iostream.h> void fun (int *a,int*b) {int*k k=a;a=b;b=k} void main() {int a=2004, b=9,*x=a,*y=b; fun(x, y) ; cout<<a<<" "<<b<<endl:}A.20049B.92004C.0D.编译时出错

下列程序的输出结果是【 】。include void swap(int *a, int *B) { int *t; t=a;a=b;b=t; 下列程序的输出结果是【 】。include <stdio.h>void swap(int *a, int *B){int *t;t=a;a=b;b=t;}main(){int i=3,j=5,*p=i,*q=j;swap(p,q);printf("%d %d\n",*p,*q);}

以下程序的输出结果是______。include void swap(int *a, int *b){ int *t;}{ int i=3,j 以下程序的输出结果是______。include <stdio.h>void swap(int *a, int *b){ int *t;}{ int i=3,j=5,*p=i,*q=j;swap(p,q); printf("%d %d\n",*p,*q);

有以下程序includevoid f(int *p,int *q);main(){ int m=1,n=2,*r=m;f(r, n 有以下程序 #include<stdio.h> void f(int *p,int *q); main() { int m=1,n=2,*r=m; f(r, n); printf("%d,%d",m,n); } void f(int*p,int*q) {p=p+1; *q=*q+1;) 程序运行后的输出结果是______。A.1,3B.2,3C.1,4D.1,2

有以下程序includestdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,stdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,n);printf(”%d\n”,*r);}int-f(int*P,int*q)(return(*p*q)?p:q;)程序运行后的输出结果是______。

以下程序的输出结果是#include "stdio.h"int *fun(int *a,int *b){ int m; m=*a; m+=*b-3; return(m);}main(){ int x=21,y=35,*a=x,*b=y; int *k; k=fun(a,b); printf("%d\n",*k);}

有下列程序: #includestdi0.h voidf(int*P,int*q); voidmain( ) (intm=1,n=2,*r=&m; f(r,&n);printf("%d,%d",m,n); } voidf(int*P,int*q){p=p+1;*q=*q+1;} 程序运行后的输出结果是( )。A.1,3B.2,3C.1,4D.1,2

以下程序的输出结果是( )。 include void swap(int*a,int*B){int*t; t=a;a=b;b=c;} main 以下程序的输出结果是( )。 include<stdio.h> void swap(int*a,int*B){int*t; t=a;a=b;b=c;} main() {int i=3,j=5,*p=i,*q=j; swap(p,q);printf("%d %d\n",*p,*q); }

00330038003000301585067361821下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)A.<class 'int'> <class 'float'> <class 'str'>B.<class 'float'> <class 'int'> <class 'str'>C.<class 'str'> <class 'float'> <class 'int'>D.<class 'str'> <class 'int'> <class 'float'>

下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)A.<class 'int'> <class 'float'> <class 'str'>B.<class 'float'> <class 'int'> <class 'str'>C.<class 'str'> <class 'float'> <class 'int'>D.<class 'str'> <class 'int'> <class 'float'>