NIIT1终极资料

更新时间:2023-09-18 22:25:01 阅读量: 小学教育 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

1.Which of the following is not an application(应用程序) software?________ A) MS Visual Studio B) Linux C) PhotoShop D) MS Office 2.Which of the following is an input device(输入设备)? ______

A) Printer B) Microphone C) Speaker D) VDU(图像显示部件 )

3.Which mouse is sensitive to pressure and motion?_____

A)Wireless B)Light Pen Mouse C) Touch Pad Mouse D) Trackball Mouse 4.Which of the following Web Brower required very little hard disk space? A) Internet Explorer B) Netscape Navigator C) Opera D) Mozilla

5.Which is a difference between an algorithm(算法) and a flowchart(流程图)?_____ A)A flowchart is a part of an algorithm B) Both cannot be compared

C) Algorithm is the graphical representation of a flowchart

D) Flowchart is a graphical representation(图形化表示形式) of a program 6.Convert(转换) is a?

A) Namespace B) Class C) Function(函数) D) Escape(逸出) sequence(数组) character

7.In the statement(语句), using System, System is a ?

A) Namespace(命名空间) B) Class C) Object D) Keyword

8.if an array is declared as, int []arr=new int[5],the total number of elements in the array is ?

A) 5 B) 2 C) 1 D) 0

9.which of the following is an example of function overloading? A) void fun() char fun() B) void fun() void fun1() C) void fun(int) void fun(char)

D) void fun1(int,int) void fun2(char,char)

10.which of the following is true about abstract (抽象)classes? A) An abstract class defines properties common to the classes derived from it B) An abstract class can be declared as final C) Abstract classes cannot be extended

D) Classes declared using the abstract keyword can be instantiated

11.Identify the SQL statement, which will retrieve (使恢复)a list of Employees from

the table Employees with the column heading for emp_id as Employee Identity Number. A) SELECT DISTINCT emp_id (Employee Identity Number) from Employees B) SELECT emp_id LIKE Employee Identity Number from Employees C) SELECT emp_id AS [Employee Identity Number] from Employees D) SELECT emp_id =Employee Identity Number from Employees

12.Which of the following properties does a transaction NOT posses? A) Atomicity B) Consistency C) Isolation D) Separation

13.Which database(数据库) object will you create to enforce(实施 )business rule?

A) Stored Procedures(存储程序) B) Views(视图) C) Triggers D) Indexes(索引)

14.Which date function would you use to extract (引出)a specified(指定的) part, such as day, month, or year from the specified date? A) DATEPART B) DATEADD C) DATEDIFF D) DATENAME

15.In which situation you must create a clustered index? A) Database uses decision support system B) Column stores sequential data

C) Query covers all the columns in a table D) Query contains a WHERE clause

16.Which of the following is not a DBMS? _____

A) Oracle B) Linux C) Microsoft SQL Server D) Sybase

17.”Column Price should be greater than $1000 and lower than $2000”. This kind of constraint belongs to _________ function of DBMS.

A) restore B) synchronous C) security D) integrity constraint 18.What is the right result after execution of SQL statements “ Select dateadd(dd, 12, '2010-12-10') ” ?____

A) 2010-12-22 B) 2011-12-10 C) 2022-12-12 D) 2011-6-10 19.Which of the following SQL statements can be used to create new database objects?____

A) DDL B) DML C) DCL D) DQL

20.Which of the following operators is used to display a set of records (记录)that contain values within a range in a column(列)?______

A) OR B) >= C) BETWEEN..AND D) %

21.Which of the following wildcard(字符) represents a single character?_____ A) % B) _ C) [ ] D) [^ ]

22.Which of the following is not a valid type of trigger?______ A) Insert Trigger B) Update Trigger C) Delete Trigger D) Before Trigger 23. The ? complier is used for C#

A) cc B) csc C) c++ D) csn 24. int Number1=0; int Number2=0;

int[] Array1=new int []{2,3,4,5,6,7,8,9,10,11}; foreach(int Ctr in Array1) {if(Ctr%2==1)

Number1++; else

{Number2++;

Console.Write(Ctr);} }

What is the output of the code?

A) 357911 B) 246810 C) Ctr D) 234567891011

25. Which of the following locks enable others to view the data being modified (修改的)by the current transaction? A) shared lock B) exclusive lock C) update lock D) intent lock

26. Which of the following components of SQL Server 2005 is used to copy and distribute(区分) data and database objects from one database server to another? A) Replication B) Service broker C) Full-text search D) Notification services

二、 阅读程序写结果(每小题5分,共10分) 1.

using System;

using System.Collections.Generic; using System.Text; namespace MultiArray {

class MultiArryExample

{ static void Main(string[] args) { int n=0; int sum = 0; int rowsum;

int[,] mArray = new int[2, 4] { { 1, 2, 3, 4 }, { 5, 6, 7, 8 } }; for(int row=0;row<2;row++) { rowsum = 0;

for (int col = 0; col < 4; col++) { if (mArray[row, col] > 0) n++;

Console.Write(\ rowsum = rowsum + mArray[row, col]; }

sum = sum + rowsum;

Console.Write(\ Console.WriteLine(); }

Console.WriteLine(\

Console.WriteLine(\ Console.ReadLine(); } } } 2.

using System; public class A

{

public virtual void Fun1(int i) {

Console.WriteLine(i); }

public void Fun2(A a) {

a.Fun1(1); Fun1(5); } }

public class B : A {

public override void Fun1(int i) {

base.Fun1(i + 1); }

public static void Main() {

B b = new B(); A a = new A(); a.Fun2(b); b.Fun2(a);

Console.ReadLine(); }}

//b.Fun1(1); 2 //Fun1(5); 5 //a.Fun1(1) 1

//Fun1(5) ->base.Fun1(5+1) 6

三、 程序填空(每空2分,共10分)

/*The function of following program is that Calculate the factorial of the number entered by a user.(The limit of users input should be 1-20)*/ using System; class Factorial {

static long Fac1;

public static bool Fac(long n, out long answer) {

long k;

bool ok = true;

if ( )//user input should be 1-20 { ok = false;} else

{

; for (k = 2; k <= n; ++k) {

; } }

; return ok; } }

class Factorial1 {

static void Main(string[] args) { long Fac1; bool ok;

long Number;

Console.WriteLine(\factorial(1-20):\

Number=long.Parse(Console.ReadLine());

ok = ; //function call if (ok)

Console.WriteLine(\ else

Console.WriteLine(\ Console.ReadLine(); } } 2.

/*The function of following program is that check a palindrome(回文) character array*/

using System;

namespace ManipulateArray {

class palindrome {

static void Main(string[] args)

{

char[] str=new char[10];

Console.WriteLine(“Enter a Palindrome string(Max 10 char):”); ; //Calling the CheckPalidrome method

本文来源:https://www.bwwdw.com/article/gd8h.html

Top