【简答题】#include "stdio.h" int add(int a,int b) int main() { extern int x,y; printf("%d\n",add(x,y)); return 0; } int x=20,y=5; int add(int a,int b) { int s=a+b; return s; }
【单选题】下面程序的运行结果是 int x,y; static int main() { int n; x=1;y=2; n=s(); console.writeline(“x={0},y={1},z={2}”,x,y,n); } static int s() { int z; x=3;y=4; z=x+y; return z; }
【单选题】已定义类A: class A{ private int x = 1; protected int y = 2; public int z = 3; public int sumA(){return(x + y + z); } } 再通过继承与扩展定义子类B: class B extends A{ private int b = 4; public int sumB(){ int s = 0; s...
【简答题】有以下程序:#include int JiSuan(int x, int y, int z);main( ) { int a=1, b=2, c=3, s; s = JiSuan(a, b, c); printf("%d", s);}int JiSuan(int x, int y, int z){ return (x != y) + z / y;}程序的运行结果是( ...