1. Trang chủ
  2. » Công Nghệ Thông Tin

PCS theory

24 561 3
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 24
Dung lượng 138 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Đề thi aptech

Trang 1

5 XML Comments begin with :

a Three forward slashes

Trang 2

c Fixed Statement

d Checked and Unchecked Statement

9 Which statements are true?

a The conditional operator works with two operands

b The increment operator works with a single operand

c The bitwise exclusive OR operator compares bits and return 1 if only one of the bits is 1.

d the conditional && operator does not check the seconds expression if the first

expression is false

e The compound assignment operators execute from right to left.

10 This typeCasting is carried out automatically by the compiler.

14 This array is a multi-dimensional array and is reference to as an array of arrays It considers

of multiple arrays where the number of elements within each array can be different.

d Multi- dimensional Array

16 This has many rows and columns.

a Multi- dimensional Array

b Single- dimensional Array

Trang 3

18 Method which is used to create Multi- Dimension Array

a public static Array CreateInstance(type elementType, int length);

b public static Array CreateArray(type elementType, int length);

c public static Array CreateInstance(type elementType, int rows, int columns);

19 This is the feature of extracting only the required information from object It’s not show all technical details of object.

Trang 4

27 You cannot use the 'this' keyword with static variables and method.

29 which statements are true?- 3 choices

a Destructors cannot be overloaded or inherited

b Destructors can be overloaded but not be inherited

c Destructors cannot be explicitly invoked

d Destructors cannot specify access modifiers and take parameters

e May be more than two Destructor in a class

30 You can use the 'base' keyword for invoking the static methods of the base class.

Trang 5

37 These represent characteristic of an Object Can not have any parameters and can be overidden but cannot be Overload.

Trang 6

public delegate Property_Name(typeData parameter1, typeData parameter2);

public string property_Name()

Trang 7

43 Which declaration is used to declare a delegate.

a public delegates Delagate_Name(int parameter1,int parameter2){}

b public delegates Delagates_Name(int parameter1,int parameter2);

c public delegate int Delagates_Name(int parameter1,int parameter2);

d public delegate float Delagate_Name(int parameter1,int parameter2){}

44 Which data structure can not be declared in a namespace ?

Trang 8

48 This exception is thrown when the result of an arithmetic, casting or conversion operation is

to large to be stored in the destination object or variable.

51 Which statements are true?

a Delegates are used ti hide static methods.

b Delegates are declared with a return type that may or may not be the same as the return type

of the referenced method.

c Delegates are used to invoke overridden methods.

52 Events can be declared in :- 2 choices

Trang 9

53 Events are implemented using delegates.

True

False

54 Steps for implementing events in C# are:

1 Create the event using the delegate.

2 Subscribe to listen and handle the event.

3 Define a public delegate for the event

4 Raise the event.

a 1-2-3-4

b 1-3-4-2

c 3-1-2-4

d 3-1-4-2

55 How to declare Event?

a delegate delegate_name (parameters); event

b delegate delegate_name (parameters); event

c event

56 which statement are true for Delegate? a.

public delegate int Add_Dele(int t1, int t2);

class Delegate_Event

{

//public Add_Dele event dele_Event;

public int add(int a,int b)

//public Add_Dele event dele_Event;

static int add(int a,int b)

Trang 10

57 Which are true?

a Event can be declared in an Interface.

b Events can are declared as Abstract or Sealed

58 Supports simple iteration over elements of a generic collection.

60 Which statement are true?

a Generics are used to work with multiple data type simultaneously.

b Generics are verified at run-time.

c Generics are declared with or without a type parameter

d Generics can be implemented without a need for explicit or implicit casting.

61 Which statements are true?

a Iterators use the yield break statement to end th iteration process.

b Iterators return a fixed number of values that cannot be changed

62 Which are true? - 2 choices

a The get accessor can be executed when the property is assigned a new value

b The get accessor can be declared using a parameter called value.

c The get accessor can be executed by referring to the name of the property.

1.Which of the following statement about C# varialble is incorrect ?

A A variable is a computer memory location identified by a unique name

B A variable's name is used to access and read the value stored in it

A A variable is allocated or deallocated in memory during runtime

C A variable can be initialized at the time of its creation or later

Trang 11

2 The.……….types feature facilitates the definition of classes ,structures and interfaces over multiple files

A public delegate int Calculation(int numOne,int numTwo);

B pulic delegate Caculation(int numOne,int numTwo);

Trang 12

C delegate int Caculation(int numOne,int numTwo);

D delegate Caculation(int numOne,int numTwo);

8 The constructor initialises an object of the ArrayList class with the specified initial capacity as the parameter

A ArrayList(String s)

B ArrayList(ICollection)

C ArrayList()

D ArrayList(int)

9 Which of the following statements about the different data types in C# are correct?

A Value type variables store actual value and are stored on the heap

B Reference type variables store memory address of other variables in a stack

C Both, value and reference type variables can be built in or user defined data types

D int and class are examples of value and reference type variables respectively

10 Which piece of code display a float value as string ?

Trang 13

11 An …….method is created when you instantiate or reference a delegate with a block of code.

A anonymous,named

B named,anonymous

C anonymous,unnamed

D unnamed,anonymous

12 The … exception is thrown when the stack runs out of space while the

… exception is thrown when the result of an arithmetic,casting or conversion operation is larger in size than the destination object or variable

Trang 14

14 Which of the following statements about delegates are correct ?

A Delegates are objects that contains references to methods that need to be invoked

B Delegates can be used to call any method identified during complication or runtime

C Delegates ,when invoked at runtime,execute the method identified at compile time

D Delegates can be associated with methods provided they have the same return type and parameter type

15 Managing memory and verifying code safety are functionalities of ………

A Common Language Runtime

B .Net Framework Class Library

C Common Language Specification

D Common Type System

16 Restriction or constraints can be applied to type parameters by using the keyword

A select

B from

C where

D return

17 Which of the following statements about the different operator are correct ?

A The Addition operator performs concatenation of strings if the operands are strings

B The Boolean inclusive OR operator returns true if at least one the expression is true

C The Conditional OR operator evaluates the second expression only if the first is true

D The Relational operators return a boolean value depending on the comparison being made

18 Which of the following statements about the partial class are correct ?

Trang 15

A Partial classes are the only types in C# that support partial definitions

B Partial classes can be defined over multiple locations to store different members

C Partial classes allow storage of private members in one file and public in another

D Partial classes allow multiple developers to work on separate sections simultaneously

19 Which of the following statements about System.Collections.Generic namespace classes are correct ?

A The List<T> class provides a generic collection of items that can be dynamically resized

B The LinkedList<T> implements the doubly linked list by storing elements in it

C The Queue<T> provides a generic collection that follows the First-In-First-Out principle

D The Dictionary<K,V> provide a generic collection of sorted key and value pairs

20 The ……… class is a combination of the.……… and ……… classes

A Hashtable,ArrayList,SortedList

B Hashtable,SortedList,Dictionary

C SortedList,ArrayList,Dictionary

D SortedList,Hashtable,ArrayList

21 Which of the following statements about the defferent types of C# statements are correct ?

A Selection statements help transfer the flew from one block to another in the program

B Iteration statements help you to repeatedly execute a block of code within program

C Jump statements transfer control after they check whether a paricular condition is true or false

D Exception handling statements manage situation that hinder the normal execution of the program

22 The method of the ArrayList class copies the elements of a list to an array while the method also copies elements of a list to an array of type Object

A Contains,TrimToSize

b CopyTo,ToArray

C TrimToSize,Contains

D ToArray,TrimToSize

23 Which of the following statements about constraints on type parameters are correct ?

A The T:struct specifies that the type parameter must be of a value type only

Trang 16

B The T:new() specifies that the type parameter must be of a reference type such as a class,interface or a delegate

C The T:<base class name> specifies that the type parameter must be a parent class or its successor

D The T:<interface name> specifies that the type parameter must be an interface or should inherit an interface

24 Which of the following statements about generic methods are correct ?

A Generic methods process values whose data types are known only when they are accessed

B Generic methods are declared with the generic type parameter list enclosed within angular

C Generic methods can be declared within generic or non generic class declaration

D Generic method bodies ,when declared within a non-generic class ,refer to the type parameters of the method and class

25 Can you re-arrange the steps given below to implement delegates in C# ?

A Declare a delegate

B Call method using the delegate object

C Create method to be referenced by delegate

D Instantiate the delegate

Trang 17

A Generic are data structures that guard against reuse of defined C# data type

functionalities

B Generic allow you to reuse the code in a safe manner without casting or boxing

C Generics are parameterized data structures that can work with reference types only

D Generics always accept a type parameter,which is a placeholder for the required date type

28 Which of the following keywords are associated with iteration statements?

29 Which of the following statements about C# are correct ?

A C# applications can easily use or integrate code written in other NET languages

B C# allows use of uninitialized variables as well as checks the overflow of types

C C# can be used to develop both,simple standalone and distributed application

D C# applications are easy to deploy because of its support for XML and SOAP

Trang 18

39 Which of the following statements about delegates in C# are correct?

A A delegate can accept a block code as a parameter

B A delegate can invoke one method at a time

C A delegate can encapsulate static methods

D A delegate is declared using the delegate keyword

Trang 19

40 .allow you to reuse a code for different data types.

A IDictionary

B LinkedList

C Inheritance

D Generics

41 Which of the following statements about exceptions are correct ?

A The System.Exception class is the base class that allows you to handle all exception

B The System.Exception class contains methods that cannot be inherited by other exception classes

C The System.Exception class can be inherited directly or indirectly by all other exception

D The System.Exception class contains properties that are common to all exceptions

42 An ………… method is an inline nameless block of code that can be passed as a delegate parameter ?

Trang 20

7 ASP.NET = Provides a set of classes to build Web applications

8 Common Language Runtime (CLR) = Performs functions such as memory management, error handling and garbage collection

9 Web Forms = Provides a set of classes to design forms for the web pages similar to the HTML forms

10 ADO.NET = Provides classes to interact with database

11 The NET Framework minimizes sofware deployment and versioning conflicts by

proviing a code-execution environment

Trang 21

27 Edit Marks = Provides a visual indication of what has changed during the editing session

28 AutoRecover = Saves the work on a regular basic and thus minimizes accidental loss of information

29 Refactoring = Changes the structure and content of the code in many ways

30 Comprehensive Tools Platform = Offers productive developer tools for novice as well as experienced programmers

31 The Solution Explorer provides a list of topics specific to the area of the IDE you are working in or the task you are trying to finish

Trang 22

34 The Dynamic Help window provides a list of topics specific to the area of the IDE you are working in or the task you are working on

Ngày đăng: 07/05/2014, 17:22

Xem thêm

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w