第一学期visual程序设计卷_第1页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、学号:_ 班级:_ 专业: _ 姓名:_第3页 共3页。装。订。线。2005年2006年第 1 学期 试卷 B卷考试时间共120分钟题号12345678910总分得分阅卷人得分一、问答题(每题7分,共49分)阅卷人1、C#数据类型有几种?分别包括哪些类型2、什么是装箱和取消装箱?3、类的静态方法和实例方法的区别?4、C#继承有哪些性质?5、C#中ADO.NET由哪两部分组成?作用是什么?6、简述DataAdapter对象的作用?7、ASP.NET内置的几个对象是什么?各有什么作用?得分二、找出下面程序的错误,给出出错的行号和出错的原因(每题7分,共21分)阅卷人1、1 using System

2、;2 class Class13 4 static void multiparams(params int var,int a)5 6 Console.WriteLine(the first params is 0 ,a);7 for(int i=0;ivar.Length;i+)8 Console.WriteLine(var0=1,i,vari);9 10 STAThread11 static void Main(string args)12 13 multiparams(100,200,399,400);14 15 答:2、1 using System;2 class classa3 4

3、protected int a;5 public int b;6 7 class Class18 9 STAThread10 static void Main(string args)11 12 classa x=new classa();13 x.b=100;14 x.a=100;15 16 3、1 using System;2 class Class13 4 static int a(int x)5 6 Console.WriteLine(x);7 return 0;8 9 static double a(int x)10 11 Console.WriteLine(x);12 Consol

4、e.WriteLine(C#);13 return 0;14 15 STAThread16 static void Main(string args)17 18 a(100.0);19 20 得分三、写出下面程序的运行结果(每题7分,共21分)阅卷人1、1 using System;2 class classa3 4 public classa()5 6 Console.WriteLine(C#);7 8 public classa(int x)9 10 Console.WriteLine(x);11 12 13 class Class114 15 STAThread16 static voi

5、d Main(string args)17 18 classa x=new classa();19 classa y=new classa(100);20 21 2、1 using System;2 class Class13 4 static void swap(ref int a,ref int b)5 6 int t;7 t=a;8 a=b;9 b=t;10 11 STAThread12 static void Main(string args)13 14 int x=10,y=20;15 Console.WriteLine(x=0,y=1,x,y);16 swap( ref x,ref

6、 y); 17 Console.WriteLine(x=0,y=1,x,y);18 19 3、1 using System;2 class aa3 4 public aa(string x)5 6 Console.WriteLine(x);7 8 9 class Class1:aa10 11 public Class1():base(This is a test)12 13 Console.WriteLine(This is not a test);14 15 STAThread16 static void Main(string args)17 18 Class1 x=new Class1();19 20 得分四、写程序(共9分

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论