選擇題
1:在軟件生命週期中,下列哪個説法是不準確的?
A.軟件生命週期分為計劃、開發和運行三個階段
B.在計劃階段要進行問題焉醛和需求分析
C.在開發後期要進行編寫代碼和軟件測試
D.在運行階段主要是進行軟件維護
2:public static void Main(string[] args)
{
int i = 2000;
object o = i;
i = 2001;
int j =(int) o;
eLine("i={0},o={1}, j={2}",i,o,j);
}
A.i=2001,o=2000,j=2000
B.i=2001,o=2001,,j=2001
C.i=2000,o=2001,,j=2000
D.i=2001,o=2000,j=2001
3:在C#中利用Socket進行網絡通信編程的一般步驟是:建立Socket偵聽、( )、利用Socket接收和發送數據。
A.建立Socket連接
B.獲得端口號
C.獲得IP地址
D.獲得主機名
4:設有變量説明語句int a=1,b=0;
則執行以下程序段的輸出結果為( )。
switch (a)
{
case 1:
switch (b)
{
case 0:printf("**0**");break;
case 1:printf("**1**");break;
}
case 2:printf("**2**");break;
}
printf(" ");
A.**0**
B.**0****2**
C.**0****1****2**
D.有語法錯誤
5:聲明一個委託public delegate int myCallBack(int x); 則用該委託產生的回調方法的原型應該是
myCallBack(int x)
receive(int num)
ng receive(int x)
D.不確定的
6:關於中的.代碼隱藏文件的描述正確的是:
窗體頁的程序的邏輯由代碼組成,這些代碼的創建用於與窗體交互。編程邏輯唯一與用户界面不同的文件中。該文件稱作為“代碼隱藏”文件,如果用C#創建,該文件
B.項目中所有Web窗體頁的代碼隱藏文件都被編譯成文件
C.項目中所有的Web窗體頁的代碼隱藏文件都被編譯成項目動態鏈接庫()文件
D.以上都不正確
7:如果設treeView1=new TreeView(),TreeNode node=new TreeNode("根結點" ),則(node)返回的是一個 ()類型的值。
Node
ng
View
8:以下的C程序代碼片段運行後C和d的值分別是多少
Int a =1,b =2;
Int c,d;
c =(a&b)&&a;
d =(a&&b)&a;
A.0,0
B.0,1
C.1,0
D.1,1
9:What compiler switch creates an xml file from the xml comments in the files in an assembly?
A./text
B./doc
C./xml
D./help
10:Which of the following operations can you NOT perform on an DataSet?
A.A DataSet can be synchronised with a RecordSet.
B.A DataSet can be synchronised with the database.
C.A DataSet can be converted to XML.
can infer the schema from a DataSet
11:In Object Oriented Programming, how would you describe encapsulation?
conversion of one type of object to another.
runtime resolution of method calls.
exposition of data.
separation of interface and implementation.
12:如下程序的運行結果是:
public abstract class A
{
public A()
{
eLine(''A'');
}
public virtual void Fun()
{
eLine("()");
}
}
public class B: A
{
public B()
{
eLine(''B'');
}
public new void Fun()
{
eLine("()");
}
public static void Main()
{
A a = new B();
();
}
}
A.A B ()
B.A B ()
C.B A ()
D.B A ()
13:Which of these string definitions will prevent escaping on backslashes in C#?
ng s = #”n Test string”;
ng s = “’n Test string”;
ng s = @”n Test string”;
ng s = “n Test string”;
14:假定a和b為int型變量,則執行下述語句組後,b的值為
a=1;
b=10;
do
{
b-=a;
a++;
} while (b--<0);
A.9
B.-2
C.-1
D.8
15:abstract class BaseClass
{
public virtual void MethodA()
{
eLine("BaseClass");
}
public virtual void MethodB()
{
}
}
class Class1: BaseClass
{
public void MethodA()
{
eLine("Class1");
}
public override void MethodB()
{
}
}
class Class2: Class1
{
new public void MethodB()
{
}
}
class MainClass
{
public static void Main(string[] args)
{
Class2 o = new Class2();
odA();
}
}
請問,此程序輸出結果是:
Class
Class Class1
s1
s1 BassClass
簡答題
16:什麼是強類型系統?
17:找出字符串A中包含的字符可以進行的所有不同組合。例如:abccd中,ab,ac,bc,cc,abd等都是可能的組合。
18:用做B/S結構的系統,您是用幾層結構來開發,每一層之間的關係以及為什麼要這樣分層?
19:寫一個方法,在JAVA,C/C++源代碼中,檢查花括弧(是“(”與 “)”,“{”與“}”)是否匹配,若不匹配,則輸出不匹配花括弧所在的行與列。
20:在一個正整數序列中求和最大的非相鄰子序列(序列任兩元素在原序列裏都不相鄰)
21:創建存儲在中的構造方法為public TestClass(){}類TestClass的實例
22:的身份驗證方式有哪些?分別是什麼原理?
23:找出一個文件中的特定單詞,並打印包含該詞的行。
24:d:的內容
c#代碼訪問'v'的代碼
25:調用算靜態引用還是動態引用?