473,570 Members | 2,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help me Test In c#

2 New Member
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?

3. The....…class is a variable-length array that can dynamically increase or decrease in size?

4. The.………interfac e defines methods to control the different generic collections?
A.ICollection .//
5. The default capacity of an ArrayList class is.....?

6. in C# ...………are created using delegates
C.synchronizati on

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.......const ructor initialises an object of the ArrayList class with the specified initial capacity as the parameter .
A.ArrayList(Str ing s)
B.ArrayList(ICo llection)
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.ToStrin g();
Console.WriteLi ne(stNum);
B.float flotNum = 500.25F;
string stNum = flotNum.ToStrin g();
Console.WriteLi ne(stNum);
C. float flotNum = 500.25F;
String stNum = flotNum.ToStrin g();
Console.WriteLi ne(stNum);
D. float flotNum = 500.25F;
string stNum = flotNum.tostrin g();
Console.WriteLi ne(stNum);

11. An ...…….method is created when you instantiate or reference a delegate with a block of ... code.
A.anonymous,nam ed
B.named,anonymo us
C.anonymous,unn amed
D.unnamed,anony mous

12. The........…... exception is thrown when the stack runs out of space while the.….......exc eption is thrown when the result of an arithmetic,cast ing or conversion operation is larger in size than the destination object or variable.
A.OverFlowExcep tion, OutOfMemoryExce ption
B.OutOfMemoryEx ception, NullReferenceEx ception
C.NullReference Exception, StackOverFlowEx ception
D.StackOverflow Exception, OverflowExcepti on

13. What is the output of the following code ?
int num =5;
Console.WriteLi ne(num+"");
if(num--= =4)
Console.WriteLi ne("(0)",num);
Console.WriteLi ne("{0}",num);

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......keywor d .

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.Collecti ons.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 ......………...cla ss is a combination of the.………......an d...…………….....c lass es.
A.Hashtable,Arr ayList,SortedLi st
B.Hashtable,Sor tedList,Diction ary
C.SortedList,Ar rayList,Diction ary
D.SortedList,Ha shtable,ArrayLi st

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........meth od of the ArrayList class copies the elements of a list to an array while the........meth od also copies elements of a list to an array of type Object.
A.Contains,Trim ToSize
B.CopyTo,ToArra y
C.TrimToSize,Co ntains
D.ToArray,TrimT oSize

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

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?

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.

31. A....………...is a set of items of same or different data types.

32. The.........pro perty of the System.Exceptio n class returns the Exception instance that caused the current exception.
D.InnerExceptio n

33. Exception thrown due to arithmetic operations or null object reference are...........e xceptions.

35. Exceptions thrown due to failure in database connection or network connection are examples of.........exce ptions
A. application-level
B. system-defined

36. The...….....fie lds are accessible by other classes but.…….....fiel ds are accessible only by the class in which they are declared.
A. public,private
B. private,protect ed
C. protected,inter nal
D. internal,public

37. The....……...int erface supports simple iteration over elements a generics ?

38. The.........exc eption is thrown when a value is assigned null object .
A.OverflowExcep tion
B.OutOfMemoryEx ception
C.NullReference Exception
D.StackOverFlow Exception

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.

41. Which of the following statements about exceptions are correct ?
A.The System.Exceptio n class is the base class that allows you to handle all exception.
B.The System.Exceptio n class contains methods that cannot be inherited by other exception classes.
C.The System.Exceptio n class can be inherited directly or indirectly by all other exception.// phong doan
D.The System.Exceptio n 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 ?

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

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

Aug 6 '09 #1
2 10010
2 New Member
huhuhuhuhu help me plzzzz
Aug 6 '09 #2
3,525 Recognized Expert Specialist
The volunteers here don't do your school work for you.
Your grades, your test.
Aug 6 '09 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: GrelEns | last post by:
hello, i had a trouble with re that i didn't understand (this is a silly example to show, to parse html i use sgmllib) : having this string : >>> s = """<form name="test" method="post" action="test.php"> <input type="text" name="title" size="1." value="test..."> <br> <a href="help.php">help</a>
by: Joao Vieira | last post by:
Hello, I have a problem with a query i'm trying to create. I have a site that provides courses and at the end of each lesson the students take a test with multiple choice answers. All that information is stored in a results table that has the following structure: Course_id (the id of the course that relates to a Courses table)
by: Akbar | last post by:
Hey there, Big-time curiosity issue here... Here's the test code (it's not that long)... it's to display a large number of image links with captions, ideally pulled in from an external file (that part's not here -- spotlighting the problem code): --------BEGIN CODE PAGE------------ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
by: Snake | last post by:
Hi guys, I have question about classes. when u create class called Test. and you define variable Test c; so does this act like( a variable c of type Test pointing to an abject )? The thing that I am confused with java where you say Test c = new Test; whre you can move this Test object around by saying "Test b" and then b = c;(so c and b...
by: John Flynn | last post by:
hi all i'm going to be quick i have an assignment due which i have no idea how to do. i work full time so i dont have the time to learn it and its due date has crept up on me .. As follows: Objectives The purpose of this assignment is to have you practice the design of object-oriented classes, including one or more of the following...
by: Alan Bashy | last post by:
Please, guys, In need help with this. It is due in the next week. Please, help me to implement the functions in this programm especially the first three constructor. I need them guys. Please, help me. This was inspired by Exercise 7 and Programming Problem 8 in Chapter 3 of our text. I have done Exercise 7 for you: Below you will find the...
by: mike | last post by:
Hello, I am kind of new to this javascript stuff and I am constantly having problems trying to get my webpage validated. I have the following <script>printdate();</script> and when I validate it at validator.w3.org I get a error the attribute given above is required for an element that you've used, but you have omitted it. For instance, in...
by: Marek Krzeminski | last post by:
I am new to ASP and I am having some problems that I hope someone can help me with. I am using WindowsXP and a book to try to learn ASP. The book instructed me to install IIS & .Net Framework v1.1 (which I did) In the book they gave me the following code: <script language="vb" runat="server">
by: samjam | last post by:
Below is some coding in a program i am using, i would like to know how i can get the text bigger or bolder on my webpage, This is the section of text i would like bigger or bolder (This is a very rare lacquered tea caddy c1840. The outside of the caddy has wonderful scenes on each side which are really finely painted. The caddy stands on claw...
by: Msleh08 | last post by:
Hello. The code below shows a basic html text file with a highlighted bar that scrolls over each <tr> using your up/down arrow. If you notice, when you scroll using your up/down arrow the page jerks. How would I remove the jerking? Also, when the highlighted bar reaches close to the bottom it shows a few lines that are to come. Is there a way in...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.