




免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
GEMS LAB CORPORATION RECRUITMENT Position: C# .NET Software design engineer(Testing)Quiz Time: 60 minutesCandidates Name:Score:SECTION 1 (3x7) The score of section 1 is _ 1 Whats the different between STRUCT and CLASS in C#?Struct是值类型。Class是引用类型。Struct类型的值直接存放在线程堆栈中,而Class类型的值存放在托管堆中,因此Struct类型的存取速度比Class快,而Class才能被垃圾收集器收集,Struct则不能。Struct is Reference Types,and Class is Value Types。Value Types are always allocated from the stack; Reference types are always allocated from the managed heap.Reference types are under the control of the garbage collector and Value Types are not.2. List all BOXING operations occur in the following code?public static void Main() Int32 v = 5; Object o = v; BOXINGv = 123; Console.WriteLine(v + , + (Int32) o); BOXINGObject o = v;Console.WriteLine(v + , + (Int32) o);3. Read the following code, please judge(1)Can the Edit pass? If not, how to revise?Yes .(2)Can the code execute after editing? If can, write out the result; else, please point out what is the matter and how to revise.The code can not execute.a System.IO.IOException will occure。Beacause file1 is be used. File.Move(file1, file2) can not execute。Revise:FileStream s= File.Create(file1);s.Close();File.Move(file1, file2);using System;using System.Collections.Generic;using System.Text;using System.IO;namespace ConsoleApplication1 class Program static void Main(string args) string path1 = C:temp; string path2 = C:test; string file1 = path1 + + test.txt; string file2 = path2 + + temp.txt; Directory.CreateDirectory(path1); Directory.CreateDirectory(path2); File.Create(file1); File.Move(file1, file2); File.Delete(file1); File.Delete(file2); 4. In Jacks family, there are four people, he, his wife, his son and his mother. One of the family is an Engineer, and another is a Doctor.If the Doctor is a male, then the Engineer is a male. If the Engineer is younger than the Doctor, then the Engineer and the Doctor are not blood relatives.If the Engineer is a female, then she and the Doctor are blood relatives.Can you tell who is an Engineer? ( A )A) Jack B) Jacks wifeC) Jacks sonD) Jacks mother5. The fathers age is three years more than three times the sons age.After three years, fathers age will be ten years more than twice the sons age.What is the fathers present age? ( C )A) 30B) 32C) 33D) 366. At 6o, a clock ticks 6 times.The time between first and last ticks is 30 seconds.How long does it tick at 12o clock. ( C )A) 60B) 66C) 65D) 30SECONTION 2 Basic Technical Knowledge (6x4)The score of section 2 is _ 1. Describe TCP/IP network model, then list commonly used protocols in each layer and describe the purpose of these protocols?1、主机到网络层2、网络互连层. 它的功能是把分组发往目标网络或主机。3、传输层. 传输层的功能是使源端主机和目标端主机上的对等实体可以进行会话。在传输层定义了两种服务质量不同的协议。TCP,UDP。4、应用层.针对网络中两台机器的应用程序互相操作的协议。比如http, TELNET.2. Given IP address 7 with subnet mark , whats the possible address of the default gateway for this host? Then whats purpose of the default gateway?3. Describe purpose of DHCP, DNS and WINS. How to configure them on Windows Server 2003?DHCP是Dynamic Host Configuration Protocol的缩写,它是TCPIP协议簇中的一种,主要是用来给网络客户机分配动态的IP地址。这些被分配的IP地址都是DHCP服务器预先保留的一个由多个地址组成的地址集,并且它们一般是一段连续的地址。DNS是域名服务系统。把域名转换成为网络可以识别的ip地址.WINS是Windows Internet Name Server(Windows网际名字服务)的简称。WINS为NetBIOS名字提供名字注册、更新、释放和转换服务4. In SQL query script, whats the difference between INNER JOIN and OUTER JOIN? Please write 2 SQL script samples to show the difference.Table aNameagexiaowang16xiaoming19Table bNameBloodxiaowangAxiaoliBInner joinSelect b.*, a.age,FromAInner joinBOna. name=resultNameageBloodxiaowang16AOuter joinSelect b.*, a.age,FromALeft outer joinBOnb. name=NameageBloodxiaowang16AxiaoliA内连接是根据每个表共有的列的值匹配两个表中的行。左外连接是根据左表的列与右表匹配。左表的所有列都会显示。右表的列只显示匹配成功的行,否则该列为空。SECTION 3 Test Foundations (6x3) The score of section 3 is _ 1. You are in charge of InternetExplorers research and development. What will you do to design, develop and test it?使用开源得方式。2. What will you do to test a banks ATM? Please give a test plan, and then list all test cases by category.ATM操作步骤:1.插卡2输入密码3输入金额4取钱5取卡输入期望值插入无效卡卡被退出,提示卡无效插入正确卡,再插入一张卡卡口封闭,无法插入插入正确卡,输入错误密码提示密码错误,重新输入插入正确卡,输入错误密码连续3次提示密码错误,并自动退出卡.插入正确卡,输入正确密码,输入错误金额提示输入金额错误插入正确卡,输入正确密码,输入正确金额ATM出钱,提示下一次操作3. Given a DVD player. What will you do to test it in a very short time? Also give your reason.SECTION 4 C# and .Net Framework (10x4)1. Write a C# program to show the usage of delegate. Please indicate which functions in C# are based on delegate technology.public delegate int GetValueDelagete(int x,int y);/定义代理类型 class client GetValueDelagete GetValue; public int add(int x,int y) return x + y; public void userdelegate() GetValue = add;/代理获取函数地址 Console.WriteLine(GetValue(1, 2);/使用代理执行方法 2. Assume some one give you a DLL which written with C+, in the DLL there is a method as below Int Sum(int num1, int num2, ) Now you are asked to use this method in your C# program. How do you do? Write up your C# code.如果该DLL是.NET的程序集,则直接引用。使用该方法跟其他的没有任何区别。Public client()Int a=Sum(1,2,.);如果是COM则需要使用如下代码声明该方法DllImport(*.dll)private extern Int Sum(int num1, int num2, );然后就可以跟调用其他方法一样使用。Public client()Int a=Sum(1,2,.);3. In C#, how do you access SQL Server Database? Write your C# code to show the common data operations. Add, Delete, Update.使用ADO.NETstring s_ConnectionString = Server=localhost;UID=sa;PWD=;Database=databasename;SqlConnection _SqlConnection = new SqlConnection(s_ConnectionString); SqlCommand _SqlCommand = _SqlConnection.CreateCommand(); _SqlCommand.CommandText = Select * from a; _SqlCommand.CommandType = CommandType.Text; _SqlConnection.Open(); _SqlCommand.EndExecuteNonQuery();操作add,de
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年中国油炸面食行业市场情况研究及竞争格局分析报告
- 2025年中国一体化燃气表行业市场规模调研及投资前景研究分析报告
- 2025年中国无尘手套行业市场前景预测及投资价值评估分析报告
- 东北一模数学试题及答案
- 基于大数据的销售业务分析与优化策略研究
- 医疗领域中的数字化设计工艺美术品探索
- 2025年钝头叉项目市场调查研究报告
- 商业视角下的远程医疗服务市场与融资模式
- 2025年野菊花枕项目市场调查研究报告
- 2025年酥饼机项目市场调查研究报告
- 店面出让股权协议书
- 深圳2025年深圳市住房公积金管理中心员额人员招聘8人笔试历年参考题库附带答案详解
- 英文电影鉴赏知到智慧树期末考试答案题库2025年北华大学
- 超标准洪水应急预案
- 美容诊所合作协议书
- 2025年人教版小学一年级下学期奥林匹克数学竞赛试卷(附答案解析)
- 2025年滁州市轨道交通运营有限公司第二批次招聘31人笔试参考题库附带答案详解
- 中外航海文化知到课后答案智慧树章节测试答案2025年春中国人民解放军海军大连舰艇学院
- 【MOOC】生命的教育-浙江大学 中国大学慕课MOOC答案
- 心肺复苏术课件2024新版
- 复调音乐巡礼-巴赫勃兰登堡协奏曲 课件-2023-2024学年高中音乐人音版(2019)必修音乐鉴赏
评论
0/150
提交评论