以下不正确的C语言标识符是____。
选项:
A:
int
B:
a_1_2
C:
ab1exe
D:
_x
int
a_1_2
ab1exe
_x
以下文字与答案无关
提示:有些试题内容 显示不完整,文字错误 或者 答案显示错误等问题,这是由于我们在扫描录入过程中 机器识别错误导致,人工逐条矫正总有遗漏,所以恳请 广大网友理解。
abc
B:a_bc
C:ab.c
D:ABC
func();
printf("MAIN:x=%2d y=%2d n=%2d",x,y,n);
func();
}
void func()
{
static int x=4;
int y=10;
x=x+2;
n=n+10;
y=y+n;
printf("FUNC:x=%2d y=%2d n=%2d",x,y,n);
}
">2.以下程序的运行结果是____________。int n=1;
void main( )
{
static int x=5;
int y;
y=n;
printf("MAIN:x=%2d y=%2d n=%2d",x,y,n);
func();
printf("MAIN:x=%2d y=%2d n=%2d",x,y,n);
func();
}
void func()
{
static int x=4;
int y=10;
x=x+2;
n=n+10;
y=y+n;
printf("FUNC:x=%2d y=%2d n=%2d",x,y,n);
}
}
public void printThat(int x,int y){
this.x = x;
this.y = y;
System.out.println("x:" + this.x + " y:" + this.y);
}
}
What is the result?
结果如何?
选项: A:x: 1 y: 2 x:3 y: 4
B:x: 0 y: 0 x: 3 y: 4
C:x: 1 y: 2 x: 0 y: 0
D:x: 0 y: 0 x: 0 y: 0
">3.public class Access {private int x = 0;
private int y = 0;
public static void main(String] args) {
Access accApp = new Access();
accApp.printThis(1,2);
accApp.printThat(3,4);
}
public void printThis(int x,int y){
x = x;
y = y;
System.out.println("x:" + this.x + " y:" + this.y);
}
public void printThat(int x,int y){
this.x = x;
this.y = y;
System.out.println("x:" + this.x + " y:" + this.y);
}
}
What is the result?
结果如何?
选项: A:x: 1 y: 2 x:3 y: 4
B:x: 0 y: 0 x: 3 y: 4
C:x: 1 y: 2 x: 0 y: 0
D:x: 0 y: 0 x: 0 y: 0
printf
B:enum
C:_a
D:sin
Test::int x=25;
B:int x=25;
C:int Test::x=25;
D:int Test x=25;
}
}
选项: A:错误:方法参数与变量不匹配
B:20 and 40
C:10 and 40
D:10 and 20
">6.以下代码的输出结果为( )。public class Pass{
static int j = 20;
public void amethod(int x){
x = x*2;
j = j*2;
}
public static void main(String args]){
int i = 10;
Pass p = new Pass();
p.amethod(i);
System.out.println(i+" and "+j);
}
}
选项: A:错误:方法参数与变量不匹配
B:20 and 40
C:10 and 40
D:10 and 20
Example(){}
B:protected int Example(int z,int y,byte x){}
C:private Example (int z,int y,byte x ){}
D:private void Example (byte x,byte y,byte z ){}
E:public Object Example(int x,int y,int z){}
Option A
B:Option B
C:Option C
D:Option D
E:Option E F:Option F">10.public abstract class Shape{private int x;
private int y;
public abstract void draw();
public void setAnchor(int x, int y ){
this.x = x;
this.y = y;
}
}
Which two classes use the shape class correctly?
哪两个类正确地使用了shape类?
选项: A:Option A
B:Option B
C:Option C
D:Option D
E:Option E F:Option Fclass A{
int x;
static int y;
void fac(String s){
System.out.println(“字符串:”+s);
}
}
下列选项中描述正确的是( )
x,y和s都是成员变量
B:x是实例变量,y是类变量,s是局部变量
C:x和y是实例变量,s是参数
D:x,y和s都是实例变量
void A(){a=0; b=0; c=0; }
B:public void A(){ a=0; b=0; c=0;}
C:public int A (int x, int y, int z){ a=x; b=y; c=z; }
D:public A(int x,int y, int z) { a=x; b=y; c=z; }
该代码表示创建了一个整数对象。
B:x是该对象的标识符。
C:可以将x的类型修改为浮点型。
D:只能对x赋予整数值。
该代码表示创建了一个整数对象。
B:x 是该对象的标识符。
C:可以将 x 的类型修改为浮点型。
D:只能对 x 赋予整数值
int
B:program
C:out
D:process
10110B
B:0386
C:0Xffa
D:x2a2