Академический Документы
Профессиональный Документы
Культура Документы
1. Variables of this data types store actual values. This value stored in a stack.
a. Value Type
b. Reference Type.
2.Variable of reference type store the memory address of other variables in a Stack.
a. True
b. False
6. Constants are declared for value types rather than for reference types.
a. True
b. False
7. This statement ensure that no other process or threads running in the computer memory can
interfere with the code. ensure security and only work with reference type.
a. Selection statement
b. Iteration statement
c. Jump Statement
d. Fixed Statement
e. Lock Statement
8. This statement is required to tell the garbage collector not to move that object during
execution.
a. Jump Statement
b. lock statement
c. Fixed Statement
d. Checked and Unchecked Statement
11. the class which provides useful methods to convert any built-in data type to another built-in
data type.
System.Console.Convert
System.Convert
13. This is a process for converting a value type to its reference type. this useful to reduce the
overhead on the system during execution.
UnBoxing
Boxing
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.
Rectangular Array.
Jagged Array.
17. This allows you to create arrays using the CreateInstance() method.
a. Array
b. New
c. Array class
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.
a. Encapsulation
b. Inheritance
c. Abstraction
d. Polymorphism
20. Details of what a class contains need not be visible to other classes and objects that use it.
a. Encapsulation
b. Inheritance
c. Polymorphism
d. Abstraction
21. A method name can be an underscore or the "@" character.
a. True
b. Fasle
22. This variable is a special type that is accessed without using an Object of a class.
public variable
protect variable
static variable
final
23. This access modifier allows the class members to be accessible within the class as well as
within the derived class.
internal
protected
private
24. This access modifier allows the class members to be accessible only within the classes of
the same assembly.
a. protected
b. public
c. internal
26.The keyword is used to resolve conflicts between variables having same names and to pass
the current object as a parameter.
out
this
ref
27. You cannot use the 'this' keyword with static variables and method.
True
False
28. A destructor starts with the character '@' before the class name.
True
False
30. You can use the 'base' keyword for invoking the static methods of the base class.
True
False
31. So as to override a particular method of base class in the derived class, we need to declare
the method of base class using the keyword.
a. override
b. virtual
32. This keyword prevents a class from being inherited by any other class.
a. Seales
b. Sealed
c. prevents
d. out
e. virtual
33. When implementing an interface in a class, you need to implement all the abstract methods
declared in the interface.
True
False
34. Properties cannot be classified as variables but, They can use the ref and out keywords.
a. True
b. False
35. These are defined with two accessors or methods, the get and set accessors.
a. Properties
b. Fields
39. This namespace contains classes and interfaces that define conplex data structure as
lists,queues ...and dictionaries.
a. System.Diagnostics
b. System.IO / System.Net
c. System.Data
d. System.Collections.
e. System.Web
40.
This namespace contains classes that make up ADO.NET architecture.
A. System.Web
B. System.Collections.
C. System.Diagnostics
D. System.Io / System.Net
E. System.Data
41.
This namespace contains classes that are used to interact with the system processes.
A. System.Data
B. System.Diagnostics
C. System.Io / System.Net
D. System.Web
42.
This namespace contains classes that enable you to read from and write to data stream
and file.
A. System.Diagnostics
B. System.Web
C. System.IO
D. System.Net
43.
This namespace contains classes that you yo create Web-base applications.
A. System.Net
B. System.Web
C. System.Diagnostics
44.
This namespace provides classes and interfaces that allow communication between the
browser and the serevr.
A. System.Net
B. System.Web
C. System.Data
45.
You can apply access modifier such as public, protected, private .. to namspaces
A. True
B. False(your answer)
b.
public string Property_Name
{
//body.
}
c.
public string this[int Property_name]
{
// body
}
d.
public delegate Property_Name(typeData parameter1, typeData parameter2);
public string property_Name()
{
//body
}
b.
public string int[int index]
{
//body
}
c.
public string this[int index]()
{
//body
}
d.
public string this[int index]
{
//body
}
47. Returns the exception instance that caused the current Exception.
a. Message
b. StrackTrace
c. InnerException
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.
a. System.ArithmaticException
b. System.InvalidCastException
c. System.OverflowException
d. System.FormatException
49. Customer exceptions can be used to changed the built-in exceptions with modified
message.
True
False
58.
Events can be declared as :
- 2 choices.
A. Classes
B. Abstract / Sealed
C. interfaces
D. Methods
E. Virtual
53. Events are implemented using delegates.
True
False
59. Represents a generic collection consisting of the key and value pairs.
a. ICollection
b. IDictionary
c. IEnumerator
A. anonymous
B. partial
C. named
D. unamed
A. ArrayList
B. Stack
C. Queue
D. SortedList
A. ICollection
B. IDictionary
C. IEnumerator
D. Ilist
A. 08
B. 16
C. 24
D. 32
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 ?
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.
Console.WriteLine(stNum);
Console.WriteLine(stNum);
Console.WriteLine(stNum);
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
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
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. 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
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
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
28. Which of the following keywords are associated with iteration statements?
A. case
B. foreach
C. switch
D. while
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.
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
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
C. system-defined
D. system-level
C. user-defined
36. The...….....fields are accessible by other classes but.…….....fields are accessible only by
the class in which they are declared.
i. public,private
B. private,protected
C. protected,internal
D. internal,public
A. ICollection
B. IDictionary
C. IEnumerator
D. Ilist
A. OverflowException
B. OutOfMemoryException
C. NullReferenceException
D. StackOverFlowException
A. IDictionary
B. LinkedList
C. Inheritance
D. Generics
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 ?
A. anonymous
B. named
C. partial
D. unnamed
1. The .NET framework enables the use of C and C++ programming languages
False
True
True
4. Microsoft .NET provides a platform for developing the next generation of windows/web
applications
True
5. C# provides a very simple and yet powerful tool for building interoperable, scalable and
robust applications
True
9. Web Forms = Provides a set of classes to design forms for the web pages similar to the
HTML forms
11. The .NET Framework minimizes sofware deployment and versioning conflicts by
proviing a code-execution environment
True
False
13. The Just-In-Time (JIT) complier converts the operating system code to the MSIL code
when the code is executed for the first time
False
True
True
16. The garbage collector allocates and de-allocates memory using automatic memory
management
True
17. C# applications integrate and use the code written in any other .NET language
True
18. Automatic memory management decreases the quality of the code and reduces the
performance and the productivity
False
19. Developers create mobile applications for pocket PCs, PDAs and cell phones using the
C# language
True
20. C# application programming uses objects so that code written once can be reused
True
21. VS 2005 is used for building high-performance desktop applications, XML Web Services
mobile applications and ASP Web applications
True
22. The Team system edition of VS 2005 is used for building applications for personal
anjoyment and use
False
23. VS 2005 is used to carry out programming in languages like Visual C++ 2005 and Visual
C#
True
True
False
26. Code Snippets = Allows the developer to enter the source code quickly with the help of
certain keystrokes
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
False
True
33. The Code window enables you to view and change the design-time properties and
events of selected objects that are located in editors and designer
False
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
True
True
36. The name of the variable can contain letters and digits
True
False
True
False
40. The variable names RectLeng and rectleng are the same
False
41. You can insert multi-line comments by starting the comment with double slash (//)
False
False
43. You can insert XML comments by starting the comment with a double slash (//)
True
44. You can specify the parameters of a method using the <param> tag
True
True
False
True
False
True
51. Keywords are used to avoid any conflicts during complie time
True
True
53. Escape sequence characters are prefixed with the ‘/’ character
False
False
55. The backslash character can be displayed using the respective escape sequence
character
True
61. The Read() method always inserts the new line character at the end of the read
character
True
62. The data type conversion methods exist in the System class
False
True
False
65. Forat specifiers allow you to change a numberic value to a date-time value
False
66. C = Currency
67. D = Decimal
68. X = Hexadecimal
69. E = Exponent
72. M = MMMM dd
75. D = MM/dd/yyyy
False
False