By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,264 Members | 1,803 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,264 IT Pros & Developers. It's quick & easy.

help me Test In c#

P: 2
This is my Test.can you help me ?

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.parial
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.threads

7. Which of the following code declare the delegate Calculation with the return type and the parameter types as integer ?
A.public delegate int Calculation(int numOne,int numTwo);
B.pulic delegate Caculation(int numOne,int numTwo);
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 ?
A.Float flotNum = 500.25F;
string stNum = flotNum.ToString();
Console.WriteLine(stNum);
B.float flotNum = 500.25F;
string stNum = flotNum.ToString();
Console.WriteLine(stNum);
C. float flotNum = 500.25F;
String stNum = flotNum.ToString();
Console.WriteLine(stNum);
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)
{
Console.WriteLine("{0}",num);
}
num--;
}
A.532
B.533
C.542
D.544

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 ?
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...…………….....class es.
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.
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

A. A B C D
B. A C D B
C. A D C B
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..........
A.array,hash table
B.hash table,heap
C.heap,queue
D.queue,array

27. Which of the following statements about generics are correct ?
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?
A.case
B.foreach
C.switch
D.while

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.

30. ......…….are a kind of parameterized data structure that can work with value types as well as reference types.
A.Iterators
B.ArrayList
C.Generics
D.Enumerator

31. A....………...is a set of items of same or different data types.
A.array
B.event
C.collection
D.list

32. The.........property of the System.Exception class returns the Exception instance that caused the current exception.
A.Message
B.Source
C.StackTrace
D.InnerException

33. Exception thrown due to arithmetic operations or null object reference are...........exceptions.
A.application-level
B.system-defined
C.system-level
D.user-defined

35. Exceptions thrown due to failure in database connection or network connection are examples of.........exceptions
A. application-level
B. system-defined
C.system-level
D.user-defined

36. The...….....fields are accessible by other classes but.…….....fields are accessible only by the class in which they are declared.
A. public,private
B. private,protected
C. protected,internal
D. internal,public

37. The....……...interface supports simple iteration over elements a generics ?
A.ICollection
B.IDictionary
C.IEnumerator
D.Ilist


38. The.........exception is thrown when a value is assigned null object .
A.OverflowException
B.OutOfMemoryException
C.NullReferenceException
D.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.
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.// phong doan
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 ?
A.anonymous
B.named
C.partial
D.unnamed

43. Which of the following statements about Visual Studio 2005 IDE key elements are correct? (chon 1 dap an!)

A.The code Editor facilitates writing, display and aditing of form, event, and method code.
B.The Dynamic help window provides a list of topics depending on the active IDE area or task.
C.The properties window display compile time properties and events of objects at all times
D.The Solution Explorer provides an organized view of projects and access tho their commands.


44: Which of the following statements about expressions and statements are correct?

A.Statements may or may not return values, but expressions always return values.
B.Statements end with semicolons but expressions do not end with semicolons.
C.Statements specify where to store computation results but expressions do not.
D.Compilers execute statements and since expressions are part of statements, they are executed with them.


45: The Visual Studio 2005 … edition is a proper choice for students enthusiasts and hobbyists? (chon 1 dap an!)

A.Team System
B.Professional
C.Standard
D.Express


46: The … class is a combination of the Hashtable class and the ArrayList class? (chon 1 dap an!)

A.SortedList
B.Collection
C.List
D.Dictionary
Aug 6 '09 #1
Share this Question
Share on Google+
2 Replies


P: 2
huhuhuhuhu help me plzzzz
Aug 6 '09 #2

tlhintoq
Expert 2.5K+
P: 3,525
The volunteers here don't do your school work for you.
Your grades, your test.
Aug 6 '09 #3

This discussion thread is closed

Replies have been disabled for this discussion.