2015级C#期末考题

这是一份2015级C#期末考试的题目集,包含选择题、判断题和填空题。涉及知识点包括C#的基础语法、关键字、数据类型、异常处理、操作符重载等。同时,介绍了类、接口、泛型等高级概念的应用。
摘要由CSDN通过智能技术生成

答案仅供参考,欢迎交流质疑。

一、选择题

2. The smallest unit for deployment in C# is called _______.

A.Assembly B.Namespace C.Package D.Modole

Assembly is the smallest unit for deployment and dynamic loading
the smallest unit for versioning

3. Not a valid indetifier _______.

A.@do B._main_ C.in D.πλα

 

In是C#关键字;可以以π、字母下划线开头

@+关键字也可以。

4. How to assign a char-type variable c with a single quote character _______.

A.c=”’” B.c=’\”’ C.c=’\’’ D.c=\’

转义符

5. How many bytes will an int type variable usually take on 64-bit machines? _______

A.2 B.4 C.8 D.16

4字节,32位

8. “enum color:byte{Red,Yellow,Blue,Green,Purple};”, then “(Color.Yellow & Color.Blue” is  _______.

A.Color.Red B.Color.Green C.Color.Purple D.null

9. How do you format a float numble x only showing 3 numbles after the dot with an 8 character width?

A.”{1:f3}”,x B.”{1,8:f}” ,x C.”{1,8:f3}”,x D.”{0,8:f3}”,x

 

索引必须从0开始

二、判断题

1. Multiple catch blocks are allowed after one try block.  T

2. String type variables are legal as branch values in switch structure.  T

C#string可以作为分支判断值

sbytebyteshort

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值