
臺北捷運公司 108 年8月4日新進工程員(二)(程式設計類)
甄試試題-計算機概論及.NET 程式設計
第 1 頁,共 3 頁
注意: 請務必填寫姓名:
1.以下題目應全部作答。 應考編號:
2.科目總分為 100 分。
3.作答時不須抄題目,但請標明題號,並請用藍(黑)色原子筆橫向書寫。
題目:
.NET Framework
(
35
)
.NET Framework
(class)
(class)
(5
)
.NET
(Common Language
Runtime, CLR
(value type)
(reference type)
struct
class
(object
instance)
(20
)
(10
)
public struct PointStruct
{
public int X;
public int Y;
public PointStruct(int x, int y)
{
this.X = x;
this.Y = y;
}
public override string ToString()
{
return "X: " + this.X + ", Y: " + this.Y;
}
}
public class PointClass

臺北捷運公司 108 年8月4日新進工程員(二)(程式設計類)
甄試試題-計算機概論及.NET 程式設計
第 2 頁,共 3 頁
{
public int X;
public int Y;
public PointClass(int x, int y)
{
this.X = x;
this.Y = y;
}
public override string ToString()
{
return "X: " + this.X + ", Y: " + this.Y;
}
}
public class Program
{
static void Main(string[] args)
{
Test();
}
private static void Test()
{
PointStruct ps = new PointStruct(0, 0);
AddOne(ps);
PointClass pc = new PointClass(0, 0);
AddOne(pc);
Console.WriteLine(ps.ToString()+"rn"+pc.ToString()); //output result
}
public static void AddOne(PointStruct ps)
{
ps.X += 1;
ps.Y += 1;
}
public static void AddOne(PointClass pc)

臺北捷運公司 108 年8月4日新進工程員(二)(程式設計類)
甄試試題-計算機概論及.NET 程式設計
第 3 頁,共 3 頁
{
pc.X += 1;
pc.Y += 1;
}
}
10
30
critical section
critical section
(10
)
critical-section problem
(10
)
(system call)
(application programming interface, API)
(10
)
15
(asymmetric-key encryption)
(5
)
(message authentication code, MAC)
MAC
(10
)
10
20
MAC address
IP address
(10
)
TCP segment
IP datagram
(10
)