本节介绍与C#相关的各种模拟测试集。您可以在本地机器上下载这些示例模拟测试,并在方便时脱机求解。每个模拟测试都提供了一个模拟测试密钥,让您自己验证最终分数和评分。
Mock Test I
Mock Test II
Mock Test III
Mock Test IV
.B, .answer-sheet{
display:none !important;
}
.Q a{
pointer-events: none;
cursor: default;
}
Q1-关于C#,以下哪一项是正确的?
A - C# is a modern, general-purpose, object-oriented programming language developed by Microsoft.
B - C# was developed by Anders Hejlsberg and his team during the development of .Net Framework.
C - C# is designed for Common Language Infrastructure (CLI).
D - All of the above.
答案:D
说明
以上所有options都是正确的。
Q2-关于C#,以下哪一项是正确的?
A - It is component oriented.
B - It can be compiled on a variety of computer platforms.
C - It is a part of .Net Framework.
D - All of the above.
答案:D
说明
以上所有options都是正确的。
q 3-以下哪个关键字用于在C#中将名称空间包含在程序中?
A - imports
B - using
C - exports
D - None of the above.
答案:B
说明
using关键字用于将名称空间包括在程序中。
q4-关于C#中的变量命名约定,以下哪一项是正确的?
A - A name must begin with a letter that could be followed by a sequence of letters, digits (0 - 9) or underscore.
B - The first character in an identifier cannot be a digit.
C - Both of the above.
D - None of the above.
答案:C
说明
以上两个options都是正确的。
Q5-关于C#中的变量命名约定,以下哪一项是正确的?
A - It should not be a C# keyword.
B - It must not contain any embedded space or symbol such as? - + ! @# % ^ & * ( ) [ ] { }
C - Both of the above.
D - None of the above.
答案:C
说明
以上两个options都是正确的。
q 6-以下哪一项是C#中的保留关键字?
A - abstract
B - as
C - foreach
D - All of the above.
答案:D
说明
以上所有options都是保留关键字。
Q7-以下哪一项是C#中的context关键字?
A - get
B - set
C - add
D - All of the above.
答案:D
说明
以上所有options都是context关键字。
Q8-我们可以在C#中使用保留关键字作为标识符?
A - true
B - false
答案:B
说明
关键字是C#编译器预定义的保留字。这些关键字不能用作标识符。
Q9-我们可以在C#中使用保留关键字作为标识符,方法是在它们前面加上@character?
A - true
B - false
答案:A
说明
如果要将这些关键字用作标识符,可以使用@字符作为关键字的前缀。
q 10-以下哪些变量类型可以在C#中直接赋值?
A - Value types
B - Reference types
C - Pointer types
D - All of the above.
答案:A
说明
值类型变量可以直接赋值。
q 11-C#中的值类型变量派生自类System.ValueType?
A - true
B - false
答案:A
说明
C#中的值类型变量派生自System.ValueType类。
q12-关于C#中的值类型变量,以下哪一项是正确的?
A - The value types directly contain data.
B - int, char, and float, which stores numbers, alphabets, and floating point numbers, respectively are value types.
C - When you declare an int type, the system allocates memory to store the value.
D - All of the above.
答案:D
说明
以上所有options都是正确的。
Q13-关于C#中的引用类型变量,以下哪一项是正确的?
A - The reference types do not contain the actual data stored in a variable.
B - They contain a reference to the variables.
C - Example of built-in reference types are: object, dynamic, and string.
D - All of the above.
答案:D
说明
以上所有options都是正确的。
Q 14-关于C#中的对象类型,以下哪一项是正确的?
A - The对象Type is the ultimate base class for all data types in C# Common Type System (CTS).
B -对象is an alias for System.Object class.
C - The object types can be assigned values of any other types, value types, reference types, predefined or user-defined types.
D - All of the above.
答案:D
说明
以上所有options都是正确的。
q15-以下哪一项正确定义了拳击?
A - 当值类型转换为对象类型时,称为装箱。
B - When an object type is converted to a value type, it is called boxing.
C - Both of the above.
D - None of the above.
答案:A
说明
当值类型转换为对象类型时,称为装箱。
q16-以下哪一项正确定义了取消装箱?
A - When a value type is converted to object type, it is called unboxing.
B - 当对象类型转换为值类型时,称为取消装箱。
C - Both of the above.
D - None of the above.
答案:B
说明
当对象类型转换为值类型时,称为取消装箱。
Q17-关于C#中的动态类型,以下哪一项是正确的?
A - You can store any type of value in the dynamic data type variable.
B - Type checking for these types of variables takes place at run-time.
C - Both of the above.
D - None of the above.
答案:C
说明
以上两个options都是正确的。
q 18-在C#中可能的情况下,以下哪一项将类型转换为布尔值?
A - ToBoolean
B - ToSingle
C - ToChar
D - ToDateTime
答案:A
说明
ToBoolean()方法在可能的情况下将类型转换为布尔值。
q 19-以下哪一项在C#中将类型转换为字节值?
A - ToSingle
B - ToByte
C - ToChar
D - ToDateTime
答案:B
说明
ToByte()方法将类型转换为字节。
q 20-在C#中可能的情况下,以下哪一项将类型转换为单个Unicode字符?
A - ToSingle
B - ToByte
C - ToChar
D - ToDateTime
答案:C
说明
Tochar()方法在可能的情况下将类型转换为单个Unicode字符。
q 21-在C#中,以下哪一项将类型(整数或字符串类型)转换为日期-时间结构?
A - ToString
B - ToSingle
C - ToChar
D - ToDateTime
答案:D
说明
ToDateTime()方法将类型(整数或字符串类型)转换为日期时间结构。
q 22-在C#中,以下哪一项将浮点或整数类型转换为DECIMAL类型?
A - ToDecimal
B - ToDouble
C - ToInt16
D - ToInt32
答案:A
说明
ToDecimal()方法将浮点或整数类型转换为decimal类型。
q 23-以下哪一项在C#中将类型转换为双精度类型?
A - ToDecimal
B - ToDouble
C - ToInt16
D - ToInt32
答案:B
说明
todouble()方法将类型转换为Double类型。
q 24-以下哪一项在C#中将类型转换为16位整数?
A - ToDecimal
B - ToDouble
C - ToInt16
D - ToInt32
答案:C
说明
ToInt16()方法将类型转换为16位整数。
q 25-在C#中,以下哪一项将类型转换为32位整数?
A - ToDecimal
B - ToDouble
C - ToInt16
D - ToInt32
答案:D
说明
ToInt32()方法将类型转换为32位整数。
| Question Number | Answer Key |
|---|---|
| 1 | D |
| 2 | D |
| 3 | B |
| 4 | C |
| 5 | C |
| 6 | D |
| 7 | D |
| 8 | B |
| 9 | A |
| 10 | A |
| 11 | A |
| 12 | D |
| 13 | D |
| 14 | D |
| 15 | A |
| 16 | B |
| 17 | C |
| 18 | A |
| 19 | B |
| 20 | C |
| 21 | D |
| 22 | A |
| 23 | B |
| 24 | C |
| 25 | D |