网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

产生式E®E1 + E2的语义动作中关于E.type的语义规则可定义为: { if E1.type=integer and E2.type=integer E.type:=integer else E.type:=real } 下面的说法正确的是

A.整型表达式和整型表达式做加法,结果是整型。

B.整型表达式和整型表达式做加法,结果是实型。

C.整型表达式和实型表达式做加法,结果是整型。

D.整型表达式和实型表达式做加法,结果是实型。


参考答案和解析
整型表达式和整型表达式做加法,结果是整型。;整型表达式和实型表达式做加法,结果是实型。
更多 “产生式E®E1 + E2的语义动作中关于E.type的语义规则可定义为: { if E1.type=integer and E2.type=integer E.type:=integer else E.type:=real } 下面的说法正确的是A.整型表达式和整型表达式做加法,结果是整型。B.整型表达式和整型表达式做加法,结果是实型。C.整型表达式和实型表达式做加法,结果是整型。D.整型表达式和实型表达式做加法,结果是实型。” 相关考题
考题 ( 27 )要想在过程 Proc 调用后返回形参 x 和 Y 的变化结果,下列定义语句中正确的是A ) Sub Proc ( x as Integer,y as Integer )B ) Sub Proc ( ByVal x as Integer, y as Integer )C ) Sub Proc ( x as Integer,Byval y as Integer )D ) Sub Proc ( Byval x as Integer, Byval y as Integer )

考题 本题中,用表格表现某个月的月历,其中标题是从Sunday到Saturday,表格中的各项是可以修改的。 import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; public class java2 ( public static void main(String[]args) { try{ UIManager.setLookAndFeel(UIManager.getSys- temLookAndFeelClassName): } catch(Exception e) JFrame. frame=new CalendarTableFrame; frame.setDefaultCloseOperation(JFrame.EXIT_ oN CLOSE); frame.show; } } clasgCalendarTableFrame. extends JFrame { private static final int WIDTH=500; private static final int HEIGHT=150: private cells= { {null,null,null,new Integer(1),new Integer (2),new Integer(3),new Integer(4)), {new Integer(5),new Integer(6),new Integer (7).new Integer(8),new Integer(9),new Integer (10),new Integer(11)), {new Integer(12),new Integer(13),new Integer (14),new Integer(15),new Integer(16),new Integer (17),new Integer(18)), {new Integer(19),new Integer(20),new Integer (21),new Integer(22),new Integer(23),new Integer (24),new Integer(25)), {new Integer(26),new Integer(27),new Integer (28),new Integer(29),new Integer(30),new Integer (31),null} }; private String[]columnNames={ "Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday" }; public CalendarTableFrame{ setTitle("java2"); setSize(WIDTH,HEIGHT); JTable table=new ; getContentPane.add(new JScrollPane(table), BorderLayout.CENTER); } }

考题 在以下事件过程中,可以在用户按下鼠标右键时,显示一个上边框,以鼠标当前位置为中心的弹出式菜单,而且这个弹出式菜单还可以识别右键对菜单命令的选择,相应的选项是( )。A.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _X As Single, Y As Single)If Button=2 ThenPopupMenu mnuEdit, vbPopupMenuCenterAlign Or _vbPopupMenuRightButton, X, Y, mnuEditOpenEnd IfEnd SubB.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _X As Single, Y As Single)If Button=2 ThenPopupMenu mnuEdit,End IfEnd SubC.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _X As Single, Y As Single)PopupMenu mnuEdit, vbPopupMenuCenterAlign Or _vbPopupMenuRightButtonEnd SubD.Private Sub Form_MouseUp(Button As Integer , _Shift As Integer, X As Single, Y As Single)If Button=2 ThenPopupMenu mnuEdit, 2End IfEnd Sub

考题 以下所列的各函数首部中,正确的是 ( )A.void play (var:Integer,var b:Integer)B.void play(int a,b)C.void play(int a,int b)D.Sub play(a as integer,b as integer)

考题 下列子过程语句中正确的是 A.Sub f1(By Val()As Integer) B.Sub f1(n()As Integer)As Integer C.Function f1(f1 As Integer)As Integer D.Function f1(By Val f As Integer)

考题 下列子过程语句中正确的是( )。A.Sub fl(By Val()As Integer)B.Sub fl(n() As Integer)As IntegerC.Functionn fl(fl As Integer)As IntegerD.Function fl(ByVal f As Integer)

考题 数组A在子过程或函数中定义为形参,正确的语句是( )。 A、Private Sub sele(ByVal A( ) As integer)B、Private Function sale(A() As Integer) As StringC、Private Sub sale(A() As Integer) As IntegerD、Private Sub sale(A(i) As Integer)

考题 如果Add函数的调用代码为:func main() {var a Integer = 1var b Integer = 2var i interface{} = asum := i.(Integer).Add(b)fmt.Println(sum)}则Add函数定义正确的是() A.type Integer intfunc (a Integer) Add(b Integer) Integer { return a + b}B.type Integer intfunc (a Integer) Add(b *Integer) Integer { return a + *b}C.type Integer intfunc (a *Integer) Add(b Integer) Integer { return *a + b}D.type Integer intfunc (a *Integer) Add(b *Integer) Integer { return *a + *b}

考题 在以下事件过程中,可以在用户按下鼠标右键时,显示一个上边框,以鼠标当前位置为心的弹出式菜单,而且这个弹出式菜单还可以识别右键对菜单命令的选择,相应的选项;A.Private Sub Form. _ Mouse Up(Button As Integer,Shift AS Integer,_ X As Single,Y As Single) If Button=2 Then PopupMenu mnuEdit,vbPopupMenuCenterAlign Or_ vbPopupMenuRightButton,X,Y,mnuEditOpen End If End SubB.Private Sub Form. _ MouseUp(Button AS Integer,Shift AS Integer,_ X As Single,Y As Single) If Button=2 Then PopupMenu mnuEdit, End If End SubC.Private Sub Form. _ MouseUp(Button AS Integer,Shift AS Integer,_ X As Single,Y As Single) PopupMenu mnuEdit,vbPopupMenuCenterAlign Or_ vbPopupMenuRightButton End SubD.Private SUb Form. _ MouseUp(Button AS Integer,_ Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu mnuEdit,2 End If End Sub

考题 以下所列的过程中,正确的是 ______。A.void play(var a: Integer, var b: Integer)B.Sub play(int a,B)C.void play(int a, intB)D.Sub play(a As Integer, b As Integer)

考题 函数过程F1的功能是:如果参数b为奇数,则返回值为1,否则返回值为0,以下能正确实现上述功能代码的是______。A.Function F1(b As Integer) If b Mnd 2=0 Then Return 0 Else Return 1 End If End FunctionB.Function F1(b As Integer) If b Mod 2=0 Then F1=0 Else F1=1 End If End FunctionC.Function F1(b As Integer) If b Mod 2=0 Than F1=1 Else F1=0 End If End FunctionD.Function F1(b As Integer) If b Mod 2<>0 Then Return 0 Else Return 1 End If End Function

考题 下列过程语句中正确的是( )。A.Sub fl(By Val () As Integer)B.Sub fl(n() As Integer)As IntegerC.Function fl(fl As Integer)As IntegerD.Function fl(By Val f As Integer)

考题 单击命令按钮时,下列程序代码的执行结果为 ( ) Function FirProc(x As Integer, y As Integer, z As Integer) FirProc=2*x+y+3*z End Function Function SecProc(x As Integer, y As Integer, z As Integer) SecProc=FirProc(z, x, y)+x End Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a=2 :b=3 :c=4 Print SecProc(c, b,A)End SubA.21B.19C.17D.34

考题 当Command1_Click事件发生时,窗体上显示的内容是 ______。 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer If a = 0 Then x = x-1 Else If b <> 0 Then x = 7 Else x=x+8 End If If c <> 0 Then x = x-3 Else x = 4 End If Print x End SubA.7B.8C.4D.3

考题 下列程序的运行结果为______。 #define MS DOS #ifdef MS DOS #define INTEGER SIZE 32 #else #define INTEGER SIZE 16 #endif main () { printf ("integer_size=%d\n", INTEGER_SIZE); }A.integersize=32B.integer_size=16C.integersize=32,integer_size=16D.错误

考题 单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b,C)End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End FunctionA.21B.23C.19D.35

考题 函数过程F1的功能是:如果参数b为奇数,则返回值为1,否则返回值为0。以下能正确实现上述功能的代码的是______。A. Function Fl(b As Integer) If b Mod 2=0 Then Return 0 Else Return 1 End If End FunctionB.Function Fl(b As Integer) If b Mod 2=0 Then F1=0 Else F1=1 End If End FunctionC.Function F1(b As Integer) If b Mod 2=0 Then F1=1 Else F1=0 End If End FunctionD.Function Fl(b As Integer) If b Mod 2<>Then Return 0 Else Return 1 End If End Function

考题 设程序中有如下数组定义和过程调用语句:Dim a(10) as integer……Call p(a)如下过程定义中,正确的是A)Private Sub p(a as integer)B)Private Sub p(a() as integer)C)Private Sub p(a(10) as integer)D)Private Sub p(a(n) as integer)

考题 下面4个CT函数中是用来判断用户输入的数是否为奇数的,是奇数的返回1,否则返回0,其中正确的是A.Function CT(ByVal a As Integer) If a Mod 2=0 Then Return 0 ElSe Return 1 End if End FunctionB.Function CT(ByVal a As Integer) If a Mod 2=0 Then CT=0 Else CT=1 End if End FunctionC.Function CT(ByVal a As Integer) If a Mod 2=0 Then CT=1 Else CT=0 End if End FunctionD.Function CT(ByVal a As Integer) If a Mod 2=0 Then Return 1 Else Return 0 End if End Function

考题 用整数10创建一个Integer类的对象,下列各语句中能完成此功能的是( )。A.Integer i=new Integer(10);B.Integer i=10;C.int i=10;D.Integer i=Integer(10);

考题 要想在过程Proc调用后返回形参x和Y的变化结果,下列定义语句中正确的是( )。【考点5过程调用与参数传递】A.Sub Proc(x as Integer,Y as Integer)B.Sub Proc(ByVal x as Integer,Y as Integer)C.Sub Proc(x as Integer,ByVal Y as Integer)D.Sub Proc(ByVal x as Integer,ByVal Y as Integer)

考题 阅读下面的程序; Function Func(x As Integer,y As Integer)As Integer Dim n As Integer Do While n < = 4 x=x + y n = n + 1 Loop Func=x End Function Private Sub Command1_Click() Dim x As Integet, y As Integer Dim n As Integer,z As Integer x=1 y=1 For n = 1 To 6 z=Func(x,y) Next n Print z End Sub 程序运行后,单击命令按钮,输出的结果为.A.16B.21C.26D.31

考题 以下将变量NewVar定义为Integer型正确的是______。A.Integer NewVarB.Dim NewVar Of IntegerC.Dim NewVar As IntegerD.Dim Integer NewVar

考题 class Beta {  public static void main(String [] args) {  Integer x = new Integer(6) * 7;  if (x != 42) {  System.out.print("42 ");  } else if (x 〈 new Integer(44-1)) {  System.out.println("less");  } else {  System.out.print("done"); } } }  结果是什么?() A、lessB、42C、doneD、编译失败

考题 以下所列的各方法头部中,正确的是()A、 void play(var a:Integer, var b:Integer)B、 void play(int a, b)C、 void play(int a, int b)D、 Sub play(a as integer, b as integer)

考题 单选题class Beta {  public static void main(String [] args) {  Integer x = new Integer(6) * 7;  if (x != 42) {  System.out.print("42 ");  } else if (x 〈 new Integer(44-1)) {  System.out.println("less");  } else {  System.out.print("done"); } } }  结果是什么?()A lessB 42C doneD 编译失败

考题 单选题在VB中,以下关于变量的声明错误的是()。A Dimx As Integer,y As LongB Dimx As Integer:y As StringC Dimx As Integer,y As IntegerD Dimx,y As String

考题 单选题以下所列的各方法头部中,正确的是()A  void play(var a:Integer, var b:Integer)B  void play(int a, b)C  void play(int a, int b)D  Sub play(a as integer, b as integer)