Tài liệu Phần thi trắc nghiệm ngôn ngữ C# - Pdf 97

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
C- A variable is allocated or deallocated in memory during runtime
D- A variable can be initialized at the time of its creation or later
2. The.……types feature facilitates the definition of classes ,structures and interfaces
over multiple files?
A- anonymous
B- partial
C- named
D- unamed
3. The …class is a variable-length array that can dynamically increase or decrease
in size?
A- ArrayList
B- Stack
C- Queue
D- SortedList
4. The.………interface defines methods to control the different generic collections?
A- ICollection .//
B- IDictionary
C- IEnumerator
D- Ilist
5. The default capacity of an ArrayList class is ?
A- 08
B- 16
C- 24
D- 32
6. in C# ………are created using delegates
A- exceptions
B- events
C- synchronization

D. float flotNum = 500.25F;
string stNum = flotNum.tostring();
Console.WriteLine(stNum);
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.
A- OverFlowException, OutOfMemoryException
B- OutOfMemoryException, NullReferenceException
C- NullReferenceException, StackOverFlowException
D- StackOverflowException, OverflowException
13. What is the output of the following code ?
int num =5;
while(num>0)
{
if(num>4)
{
Console.WriteLine(num+"");
}
num;
if(num = =4)
{
Console.WriteLine("(0)",num);
}
if(num==3)

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 ?
Partial classes are the only types in C# that support partial definitions
Partial classes can be defined over multiple locations to store different members
Partial classes allow storage of private members in one file and public in another
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 ?
The List<T> class provides a generic collection of items that can be dynamically
resized
The LinkedList<T> implements the doubly linked list by storing elements in it
The Queue<T> provides a generic collection that follows the First-In-First-Out
principle
The Dictionary<K,V> provide a generic collection of sorted key and value pairs
20. The ……… class is a combination of the.……… and …………… class es.
Hashtable,ArrayList,SortedList
Hashtable,SortedList,Dictionary
SortedList,ArrayList,Dictionary
SortedList,Hashtable,ArrayList
21. Which of the following statements about the defferent types of C# statements
are correct ?
Selection statements help transfer the flew from one block to another in the
program.
Iteration statements help you to repeatedly execute a block of code within program .
Jump statements transfer control after they check whether a paricular condition is
true or false
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

D. A B D C
26. The SortedList class behaves like an if you access its elements based on
their index number otherwise it behaves like a
array,hash table
hash table,heap
heap,queue
queue,array
27. Which of the following statements about generics are correct ?
Generic are data structures that guard against reuse of defined C# data type
functionalities.
Generic allow you to reuse the code in a safe manner without casting or boxing.
Generics are parameterized data structures that can work with reference types only.
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?
case
foreach
switch
while
29. Which of the following statements about C# are correct ?
C# applications can easily use or integrate code written in other .NET languages.
C# allows use of uninitialized variables as well as checks the overflow of types.
C# can be used to develop both,simple standalone and distributed application.
C# applications are easy to deploy because of its support for XML and SOAP.
30. …….are a kind of parameterized data structure that can work with value
types as well as reference types.
Iterators
ArrayList
Generics
Enumerator

ICollection
IDictionary
IEnumerator
Ilist
38. The exception is thrown when a value is assigned null object .
OverflowException
OutOfMemoryException
NullReferenceException
StackOverFlowException
39. Which of the following statements about delegates in C# are correct?
A delegate can accept a block code as a parameter.
A delegate can invoke one method at a time.
A delegate can encapsulate static methods.
A delegate is declared using the delegate keyword
40. allow you to reuse a code for different data types.
IDictionary
LinkedList
Inheritance
Generics
41. Which of the following statements about exceptions are correct ?
The System.Exception class is the base class that allows you to handle all exception.
The System.Exception class contains methods that cannot be inherited by other
exception classes.
The System.Exception class can be inherited directly or indirectly by all other
exception.// phong doan
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 ?
anonymous
named

Dictionary


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status