下列程序的输出结果是() 。using System; namespace aaa { class Example1 { static long sub(int x,int y) { int a = x*x+y*y; return a; } public static void Main() { int a=30; sub(5,2); Console.WriteLine("{0}",a); }
A.0
B.29
C.30
D.无定值
A.0
B.29
C.30
D.无定值
public class exl6
{
public static void main(String[] args)
{
int i;
int a[] = new int[10];
for(i = O; i < a.length; i++)
a[i] = i * 10 + j;
for(i = 1; i < a.length; i++)
if(a[i]%5 == O)
System,out.println(a[i]);
}
}
A、good and abc
B、good and gbc
C、test ok and abc
D、test ok and gbc
A、false true
B、true false
C、false false
D、true true
A. 5
B. 4
C. 6
D. 不确定
A、非成年人不得入内
B、成年人不得入内
C、不得入内非成年人
D、不得入内成年人
A、private
B、protected
C、internal
D、public
A、obj.fun方法被调用4次
B、obj.fun方法被调用2次
C、obj.fun方法被调用1次
D、obj.fun方法不会被调用
用语言描述下面的程序:using System; using System.Collections.Generic; using System.Text; namespace Graph { class Program { static void Main(string[] args) { circular c = new circular(); Console.WriteLine(c.getSides()); square s = new square(); Console.WriteLine(s.getSides()); Graph g; g= new circular(); Console.WriteLine(g.getSides()); g = new square(); Console.WriteLine(g.getSides()); } } public abstract class Graph { public abstract int getSides(); } public class circular : Graph { public override int getSides() { return 1; } } public class square : Graph { public override int getSides() { return 2; } } }
A、i+=2;
B、Console.WriteLine(i+2);
C、int j=i; Console.WriteLine(++j);
D、Console.WriteLine(i>>2);
A、int arr1[ ]={6,5,1,2,3};
B、int [ ] arr2=new int[ ];
C、int[ ] arr3=new int[ ]{6,5,1,2,3};
D、int[ ] arr4;arr4={6,5,1,2,3};
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!