C#程序设计模拟题200(认证).pdf





《C#程序设计模拟题200(认证).pdf》由会员分享,可在线阅读,更多相关《C#程序设计模拟题200(认证).pdf(94页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、第一套题 号1/50Visual Studio.NET窗 口 中 解 HTM L文挡时,可 以 使 用()窗口来编辑某HTM L兀素的Text、T itle、Style等信息.单 项 选 择 题 新记7资源视图类视图属性D r解决方案资源管理器2在 Vis u a l S t u d io.N e t 窗口中,()窗口提供了连接到本地或远程计算机上数据库并进行管理的功能。A工具箱 B资嫄视图 C解决方案资源管理器D 服务器资源管理器D3已知名字空间C o m pa n y N a m e 尚未定义.请问下列名字空间的定义是否合法?()n a m e s pa c e C o m pa y N
2、a m e.S a l e spu b l ic c l a s s C u s t o m e r(类的内容A合法 B 不合法A题 号 5 0下列哪些运算符是属于“右结合”的?()题 号5/50下列语句在控制台上的输出是什么?()if (true)System.Console.Wri teLine(FirstMessage*);System.Console.Wri teLine CSecondMessage*);B6进程中使用的线程越多,执行速度就越快,这种说法对不对?()A说法错误 B说法正确A7 XC OP Y命令的()选项用来指示复制所有子目录,即使是空目录也要复制.A /q B /s
3、 C /p D /eD下列函数定义的第3条语句是否合法?()void T est)tin t i=100;object s=i;in t j=o;题 号8/50单 项 选 择 题标 记7合法B C不合法B9 类 C l a s s i,C l a s s 2,C l a s s 3 的定义如下:a b s t r a c t c l a s s C l a s s ia b s t r a c t pu b l ic v o id t e s t();)c l a s s C l a s s 2:C l a s s l pu b l ic o v e r r id e v o id t e s
4、 t()C o n s o l e.Wr it e(C l a s s 2);class Class3:Class2public override void test()Console.Write(Class3);)则下列语句的输出是什么?()(提示:从抽象类派生类的规则)Class3 x=new Class3 0;x.test();A Class2 Class3 B Class3 Class2 C Class3 D Class2C10 类 Classi,Class2,Class3 的定义如下:abstract class Classiabstract public void test();)
5、class Class2:Classlpublic override void test()Console.Write(Class2);)class Class3:Class2public void test()Console.Write(Class3);)则下列语句的输出是什么?()(提示:从抽象类派生类的规则)Classi x=new Class30;x.test 0;A Class2 Class3 B Class3 Class2 C Class3 D Class2D11 类 Classi,Class2,Class3 的定义如下:abstract class Classiabstract
6、public void test();)class Class2:Classlpublic override void test()Console.Write(z,Class2z,);)class Class3:Class2public void test()Console.Write(/zClass3z);则下列语句的输出是什么?()(提示:从抽象类派生类的规则)C l a s s 3 x=n e w C l a s s 3 ();x.t e s t ();A C l a s s 2 C l a s s 3 B C l a s s 3 C l a s s 2 C C l a s s 3 D
7、C l a s s 2C1 2 类 C l a s s i,C l a s s 2,C l a s s 3 的定义如下:a b s t r a c t c l a s s C l a s s ia b s t r a c t pu b l ic v o id t e s t ();)c l a s s C l a s s 2:C l a s s l pu b l ic o v e r r id e v o id t e s t()C o n s o l e.Wr it e(C l a s s 2);c l a s s C l a s s 3:C l a s s 2 未提供方法t e s t 的
8、实现)则下列语句的输出是什么?()(提示:从普通类派生类的规则)C l a s s 3 x=n e w C l a s s 3 0 ;x.t e s t ();A C l a s s 2 C l a s s 3 B C l a s s 3 C l a s s 2 C C l a s s 3 D C l a s s 2D1 3 下列类M y C l a s s 的 N a m e 属性定义是否正确?()(提示:从抽象类派生类的规则)pu b l ic a b s t r a c t c l a s s B a s e(pu b l ic a b s t r a c t s t r in g N
9、a m e ge t;s e t;)pu b l ic c l a s s M y C l a s s s t r in g _ m s g;pu b l ic o v e r r id e s t r in g N a m e(ge t (r e t u r n t his._ m s g;A正确BB不正确1 4 下列语句是M y C l a s s 的一部分,o b j是 M y C l a s s 的一个对象。v o id c ha n ge (in t i)(i+;pu b l ic v o id t e s t()(in t a=1 0 0;c ha n ge(a);C o n s
10、o l e.Wr it e Lin e(a);则调用o b j.t e s t。后。控制台输出()0A 1 0 0 B 0 C 1 0 1A1 5 下列语句是M y C l a s s 的一部分,o b j是 M y C l a s s 的一个对象。v o id c ha n ge(r e f in t i)(i+;)pu b l ic v o id t e s t ()(in t a=1 0 0;c ha n ge(r e f a);C o n s o l e.Wr it e Lin e(a);)则调用o b j.t e s t。后。控制台输出()oA 1 0 0 B 0 C 1 0 1C题
11、 号16/50面向对象编程中的“继承”的概念是指().单 项 选 择 题 新记?对象之间通过消息进行交互B R派生自同一个基类的不同类的对冢具有一些共同特征c对冢的内部细节被隐藏D r|派生类对冢可以不受限制地访问所有的基类对冢B17下列语句是M y C l a s s 的一部分,o b j是M y C l a s s 的一个对象。v o id c ha n ge(s t r in g s t r)(s t r 二 n e w s t r in g”;pu b l ic v o id t e s t()(s t r in g s=o l d s t r in g”;c ha n ge (s);
12、C o n s o l e.Wr it e Lin e (s);则调用o b j.t e s t()后。控制台输出()oA n e w s t r in g B o l d s t r in gB1 8 接口 I M y l n t e r f a c e 的定义如下:pu b l ic in t e r f a c e M y l n t e r f a c e(s t r in g N a m e ge t;s e t;需定义一类M y C l a s s 实现该接口,则该类下列定义是否合法?()c l a s s M y C l a s s:M y l n t e r f a c epu
13、 b l ic s t r in g N a m e ge t r e t u r n “On l y a t e s t!”;s e t )A合法 B不合法A1 9接口 I M y l n t e r f a c e的定义如下:pu b l ic in t e r f a c e M y l n t e r f a c e(s t r in g N a m e ge t;s e t;)需定义一类M y C l a s s实现该接口,则该类下列定义是否合法?()c l a s s M y C l a s s:M y l n t e r f a c epu b l ic s t r in g N
14、 a m e ge t;s e t;A合法 B不合法B20接口 I M y l n t e r f a c e的定义如下:pu b l ic in t e r f a c e M y l n t e r f a c e(s t r in g N a m e ge t;s e t;)需定义一类M y C l a s s实现该接口,则该类下列定义是否合法?()c l a s s M y C l a s s:M y l n t e r f a c e(pr iv a t e s t r in g N a m e ge t r e t u r n On l y a t e s t!/z;s e t )
15、A合法 B不合法B21接口 I M y l n t e r f a c e的定义如下:pu b l ic in t e r f a c e M y l n t e r f a c es t r in g N a m e ge t;类 M y C l a s s 定义如下:c l a s s M y C l a s spu b l ic s t r in g N a m e ge t r e t u r n On l y a t e s t!”;)则下列语句的编译、运行结果如何?()M y l n t e r f a c e x=n e w M y C l a s s();C o n s o l
16、 e.Wr it e Lin e(x.N a m e);A可以编译通过,但运行出现异常 B运行正常,输出字符串 On l y a t e s t!C 编译出错c2 2 接口 I M y l n t e r f a c e 的定义如下:pu b l ic in t e r f a c e M y l n t e r f a c e(s t r in g N a m e ge t;)类 M y C l a s s 定义如下:c l a s s M y C l a s s(pu b l ic s t r in g N a m e(ge t r e t u r n On l y a t e s t!z
17、,;)则下列语句的编译、运行结果如何?()M y l n t e r f a c e x=(M y l n t e r f a c e)n e w M y C l a s s();C o n s o l e.Wr it e Lin e(x.N a m e);A可以编译通过,但运行出现异常 B运行正常,输出字符串 On l y a t e s t!”C 编译出错A2 3 接口 I M y l n t e r f a c e 的定义如下:pu b l ic in t e r f a c e M y l n t e r f a c e(s t r in g N a m e ge t;)类 M y C
18、 l a s s 定义如下:c l a s s M y C l a s s:M y I n t e r f a c epu b l ic s t r in g N a m e ge t r e t u r n On l y a t e s t!z,;则下列语句的编译、运行结果如何?()M y l n t e r f a c e x=n e w M y C l a s s();C o n s o l e.Wr it e Lin e(x.N a m e);A可以编译通过,但运行出现异常 B运行正常,输出字符串On l y a t e s t!C编译出错B24接口 I M y l n t e r f
19、 a c e的定义如下:pu b l ic in t e r f a c e M y l n t e r f a c e(s t r in g N a m e ge t;)类M y C l a s s定义如下:c l a s s M y C l a s spu b l ic s t r in g N a m e ge t r e t u r n On l y a t e s t!,z;)则下列语句的编译、运行结果如何?()M y l n t e r f a c e x=n e w M y l n t e r f a c e();C o n s o l e.Wr it e Lin e(x.N a
20、 m e);A可以编译通过,但运行出现异常 B运行正常,输出字符串On l y a t e s t!C编译出错c25分析下列程序pu b l ic in t e r f a c e B a s e in t e r f a c e v o id T e s t ();)pu b l ic c l a s s M y C l a s s l:B a s e I n t e r f a c e pu b l ic v o id T e s t ()C o n s o l e.Wr it e (/zin M y C l a s s l;);)pu b l ic c l a s s M y C l a
21、 s s 2:M y C l a s s l pu b l ic v o id T e s t()C o n s o l e.Wr it e d n M y C l a s s 2;);则下列语句的输出是什么?()B a s e in t e r f a c e x=n e w M y C l a s s 2();x.T e s t();A in M y C l a s s l;B in M y C l a s s 2;C 无输出 D in M y C l a s s l;in M y C l a s s 2;A26下列语句的输出是()od o u b l e m y D o u b l e=
22、1 2 3 4 5 6 7 8 9;C o n s o l e.Wr it e Lin e(0:C ”,m y D o u b l e);A 1 2 3 4 5 6 7 8 9.0 0 B 1 2 3,4 5 6,7 8 9.0 0 C 1.2 3 4 5 6 8 E+0 0 8 D$1 2 3,4 5 6,7 8 9.0 0D27下列语句的输出是()od o u b l e m y D o u b l e=1 2 3 4 5 6 7 8 9;C o n s o l e.Wr it e Lin e(0:N ”,m y D o u b l e);A 1 2 3 4 5 6 7 8 9.0 0 B
23、 1 2 3,4 5 6,7 8 9.0 0 C 1.2 3 4 5 6 8 E+0 0 8 D$1 2 3,4 5 6,7 8 9.0 0B题 号28/50下列语句的输出是().double MyDouble=9999.94;Console.W riteLine0:#.MyDouble);C29下列语句的输出是()od o u b l e m y D o u b l e=0.2;C o n s o l e.Wr it e Lin e(0:#%,m y D o u b l e);A 2 0%B 0.2%C#%D 0:#%A30下列语句的输出是()0d o u b l e m y D o u b
24、 l e=9 9 9 9.9 9;C o n s o l e.Wr it e Lin e(0:#,#.#,m y D o u b l e);A 9 9 9,9.9 9 B 9,9.9 9 C 9,9 9 9.9 9 D 9 9 9 9.9 9C31下列语句的输出是()od o u b l e m y D o u b l e=1 2 3 4 5 6 7 8 9;C o n s o l e.Wr it e Lin e(0:F ”,m y D o u b l e);A 1 2 3 4 5 6 7 8 9.0 0 B 1 2 3,4 5 6,7 8 9.0 0 C 1.2 3 4 5 6 8 E+0
25、0 8 D$1 2 3,4 5 6,7 8 9.0 032在Vis u a l S t u d io.N e t中,可使用()来创建包含数据绑定控件的窗体。A数据窗体向导 B数据适配器向导 C服务器资源管理器D对象浏览器33在AD O.N E T中,可以在D a ta Se t中维护。对象的集合来管理表间的导航关系。A D a ta T a b l e B D a ta R o w C D a ta C o l um n D D a ta R e l a ti o nD题 号 34/50在使用ADO.NE抽 接 到 SQL Server 2000时,若希望使用Windows当前登录用户的账户信
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C# 程序设计 模拟 200 认证

限制150内