from:http://blog.csdn.net/bz201/archive/2005/12/11/549738.aspx 雅虎公司C#笔试题,包括问答题和选择题两部分。试试看,你能回答出多少题,可以通过雅虎的考试吗? Question 1. (单选) 1. 传输率 以下关于链式存储结构的叙述中哪一条是不正确的? 1. 结点除自身信息外还包括指针域,因此存储密度小于顺序存储结构 以下哪一个不是栈的基本运算 1. 删除栈顶元素 以下关于广义表的叙述中,正确的是 1. 广义表是0个或多个单元素或子表组成的有限序列 如果一棵二叉树结点的前序序列是A、B、C,后序序列是C、B、A,则该二叉树结点的对称序序列 1. 必为A、B、C 在虚拟页式存储管理方案中,下面哪一部分完成将页面调入内存的工作? 1. 缺页中断处理 1. 位图表 设有关系R(S,D,M),其函数依赖集F={S→D,D→M}。则关系R至多满足 1. 1NF 在数据库逻辑设计中,当将E-R图转换为关系模式时,下面的做法哪一个是不正确的? 1. 一个实体类型转换为一个关系模式 计算机网络按照所覆盖的地理范围分类,可以分广域网、局域网与 1. TCP/IP网
1. 资源子网 网络协议的三个要素是语法、语义与 1. 工作原理 TCP/IP参考模型中,电子邮件协议SMTP依赖于传输层的 1. UDP协议 IEEE802.2协议中10BASE-T标准规定在使用5类双绞线时,从网卡到集线器的最大距离为 1. 100m 100Mbps Fast Ethernet与10Mbps Ethernet 工作原理的相同之处主要在 1. 介质访问控制方法 在Client/Server计算模式中,中间件middleware的作用是隔离应用与 1. 结构化查询语言SQL 当用户向ISP申请Internet帐户时,用户的E-mail帐户应包括 1. IP地址 WWW的超链接中定位信息所在的位置使用的是 1. 超文本(hypertext)技术 计算机网络系统与分布式系统之间的区别主要是 1. 系统物理结构 帧中继系统设计的主要目标是用于互连多个 1. 广域网
1. 1024B TCP/IP参考模型中的主机-网络层对应于OSI RM中的 1. 网络层 计算机网络最突出的优点是: 1. 计算精度高 计算机网络分为局域网、城域网与广域网,其划分的依据是: 1. 数据传输所使用的介质 用二分法查找一个长度为10的、排好序的线性表,查找不成功时,最多需要比较多少次? 1. 5 模块内聚度越高,说明模块内各成分彼此结合的程度越 1. 松散 软件需求分析阶段的输出主要是 1. 需求说明书 以下选项中不是项目经理的职责的是? 1. 需求分析 单元测试一般在什么时候进行? 1. 编码完成后 配置管理能起到以下哪些作用? 1. 版本管理
Question 31. (单选)
public void test(int i) 1. 会锁死 Question 32. (单选) 以下描述错误的是() 1. 在C++中支持抽象类而在C#中不支持抽象类。 int[][] myArray3=new int[3][]{new int[3]{5,6,2},new int[5]{6,9,7,8,3},new int[2]{3,2}}; myArray3[2][2]的值是()。 1. 9 在C#中利用Socket进行网络通信编程的一般步骤是:建立Socket侦听、( )、利用Socket接收和发送数据。 1. 建立Socket连接 如果设treeView1=new TreeView(),TreeNode node=new TreeNode("根结点" ),则treeView1.Nodes.Add(node)返回的是一个 ()类型的值。 1. TreeNode; 声明一个委托public delegate int myCallBack(int x); 则用该委托产生的回调方法的原型应该是 1. void myCallBack(int x) 关于ASP.NET中的代码隐藏文件的描述正确的是 1. Web窗体页的程序的逻辑由代码组成,这些代码的创建用于与窗体交互。编程逻辑唯一与用户界面不同的文件中。该文件称作为“代码隐藏”文件,如果用C#创建,该文件 What compiler switch creates an xml file from the xml comments in the files in an assembly? 1. /text 下面的代码实现了设计模式中的什么模式 public class A { public static A Instance { 1. Factory class Class1 请问,Class1.Count的值是多少?( ) 1. 1
Question 41. (单选)
请问,此程序输出结果是: 1. BaseClass public static void Main(string[] args) 1. i=2001,o=2000,j=2000 您要创建ASP.NET应用程序用于运行AllWin公司内部的Web站点,这个应用程序包含了50个页面。您想要配置这个应用程序以便当发生一个HTTP代码错误时它可以显示一个自定义的错误页面给用户。您想要花最小的代价完成这些目标,您应该怎么做?(多选) 1. 在这个应用程序的Global.asax文件中创建一个Application_Error过程去处理ASP.NET代码错误。 |
如下程序的运行结果是:
public abstract class A
{
public A()
{
Console.WriteLine('A');
}
public virtual void Fun()
{
Console.WriteLine("A.Fun()");
}
}
public class B: A
{
public B()
{
Console.WriteLine('B');
}
public new void Fun()
{
Console.WriteLine("B.Fun()");
}
public static void Main()
{
A a = new B();
a.Fun();
}
}
1. A B A.Fun()
2. A B B.Fun()
3. B A A.Fun()
4. B A B.Fun()
Question 45. (单选)
Which of these string definitions will prevent escaping on backslashes in C#?*
1. string s = #”n Test string”;
2. string s = “’n Test string”;
3. string s = @”n Test string”;
4. string s = “n Test string”;
Question 46. (单选)
Which of the following operations can you NOT perform on an ADO.NET DataSet?
1. A DataSet can be synchronised with a RecordSet.
2. A DataSet can be synchronised with the database.
3. A DataSet can be converted to XML.
4. You can infer the schema from a DataSet
Question 47. (单选)
In Object Oriented Programming, how would you describe encapsulation?
1. The conversion of one type of object to another.
2. The runtime resolution of method calls.
3. The exposition of data.
4. The separation of interface and implementation.
Question 48. (单选)
How does assembly versioning in .NET prevent DLL Hell?
1. The runtime checks to see that only one version of an assembly is on the machine at any one time.
2. .NET allows assemblies to specify the name AND the version of any assemblies they need to run.
3. The compiler offers compile time checking for backward compatibility.
4. It doesn’t.
Question 49. (单选)
三种常用的字符串判空串方法:
1: bool isEmpty = (str.Length == 0);
2: bool isEmpty = (str == String.Empty);
3: bool isEmpty = (str == "");
哪种方法最快?
1. 1
2. 2
3. 3
Question 50. (单选)
public sealed class SampleSingleton1
{
private int m_Counter = 0;
private SampleSingleton1()
{
Console.WriteLine(""初始化SampleSingleton1。"");
}
public static readonly SampleSingleton1 Singleton = new SampleSingleton1();
public void Counter()
{
m_Counter ++;
}
}
以上代码实现了设计模式中的哪种模式?
1. 原型
2. 抽象工厂
3. 单键
4. 生成器