Sie sind auf Seite 1von 19

1. Which of the following statements is correct about Managed Code?

A. Managed code is the code that is compiled B. Managed code is the code where resources
by the JIT compilers. are Garbage Collected.
C. Managed code is the code that runs on top of D. Managed code is the code that is written to
Windows. target the services of the CLR.

Answer: D

2. Which of the following utilities can be used to compile managed assemblies into processor-specific
native code?
A. gacutil B. ngen
C. sn D. dumpbin

Answer: B

3. Which of the following components of the .NET framework provide an extensible set of classes
that can be used by any .NET compliant programming language?
A. It is an environment for developing, building, B. It is an environment for developing, building,
deploying and executing Desktop deploying and executing only Web
Applications, Web Applications and Web Applications.
Services.
C. It is an environment for developing, building, D. It is an environment for developing, building,
deploying and executing Distributed deploying and executing Web Services.
Applications.

Answer: A

4. Which of the following assemblies can be stored in Global Assembly Cache?


A. Private Assemblies B. Friend Assemblies
C. Shared Assemblies D. Public Assemblies

Answer: C

5. Code that targets the Common Language Runtime is known as


A. Unmanaged B. Distributed
C. Legacy D. Managed Code
Answer: D

6. Which of the following statements is correct about the .NET Framework?


A. .NET Framework uses DCOM for achieving B. .NET Framework is built on the DCOM
language interoperability. technology.
C. .NET Framework uses DCOM for making D. .NET Framework uses DCOM for creating
transition between managed and unmanaged unmanaged applications.
code.

Answer: C

7. Which of the following statements is correct?


A. A constructor can be used to set default B. C# provides a copy constructor.
values and limit instantiation.
C. Destructors are used with classes as well as D. A class can have more than one destructor.
structures.

Answer: A

8. Which of the following statements is correct about constructors?


A. If we provide a one-argument constructor B. Static constructors can use optional
then the compiler still provides a zero- arguments.
argument constructor.
C. Overloaded constructors cannot use optional D. If we do not provide a constructor, then the
arguments. compiler provides a zero-argument
constructor.

Answer: D

9. How many times can a constructor be called during lifetime of the object?
A. As many times as we call it. B. Only once.
C. Depends upon a Project Setting made in D. Any number of times before the object gets
Visual Studio.NET. garbage collected.

Answer: B
10. Which of the following statements are correct about static functions?
A. Static functions are invoked using objects of B. Static functions can access static data as
a class. well as instance data.
C. Static functions are outside the class scope. D. Static functions are invoked using class.

Answer: D

11. When would a structure variable get destroyed?


A. When no reference refers to it, it will get B. Depends upon whether it is created
garbage collected. using new or without using new.
C. When it goes out of scope. D. Depends upon the Project Settings made in
Visual Studio.NET.

Answer: C

12. Which of the following statements is correct about properties used in C#.NET?
A. A property can simultaneously be read only B. A property can be either read only or write
or write only. only.
C. A write only property will have only get D. A write only property will always return a
accessor. value.

Answer: B

13. Which of the following statements is correct about an Exception?


A. It occurs during compilation. B. It occurs during linking.
C. It occurs at run-time. D. It occurs during Just-In-Time compilation.

Answer: C

14. In C#.NET if we do not catch the exception thrown at runtime then which of the following will
catch it?
A. Compiler B. CLR
C. Linker D. Loader

Answer: B

15. Which of the following is the Object Oriented way of handling run-time errors?
A. OnError B. HERESULT
C. Exceptions D. Error codes

Answer: C

16. Which of the following is NOT an Exception?


A. StackOverflow B. Division By Zero
C. Insufficient Memory D. Incorrect Arithmetic Expression

Answer: D

17. A class implements two interfaces each containing three methods. The class contains no instance
data. Which of the following correctly indicate the size of the object created from this class?
A. 12 bytes B. 24 bytes
C. 0 byte D. 8 bytes

Answer: B

18. Which of the following statements is correct about an interface used in C#.NET?
A. One class can implement only one interface. B. In a program if one class implements an
interface then no other class in the same
program can implement this interface.
C. From two base interfaces a new interface D. Properties can be declared inside an
cannot be inherited. interface.

Answer: D

19. Which of the following statements is correct about an interface?


A. One interface can be implemented in another B. An interface can be implemented by multiple
interface. classes in the same program.
C. A class that implements an interface can D. The functions declared in an interface have a
explicitly implement members of that body.
interface.

Answer: C

20. Which of the following statements is incorrect about delegate?


A. Delegates are reference types. B. Delegates are object oriented.
C. Delegates serve the same purpose as D. Only one method can be called using a
function pointers in C and pointers to delegate.
member function operators in C++.

Answer: D

21. Which of the following is the necessary condition for implementing delegates?
A. Class declaration B. Inheritance
C. Run-time Polymorphism D. Exceptions

Answer: A

22. Which of the following is NOT an Arithmetic operator in C#.NET?


A. ** B. /
C. + D. %

Answer: A

23. Which of the following are Relational operators in C#.NET?


A. >= B. !=
C. <= D. All of these

Answer: D

24. CLR is the .NET equivalent of _________.


A. Common Type System B. Java Virtual Machine
C. Common Language Runtime D. Common Language Specification

Answer: B

25. The CLR is physically represented by an assembly named _______


A. mscor.dll B. msoree.dll
C. mcoree.dll D. mscoree.dll
Answer: D

26. SOAP stands for __________.


A. Simple Object Access Protocol B. Simple Object Access Program
C. Simple Object Account Protocol D. Simple Object Application Protocol

Answer: A

27. The ____ language allows more than one method in a single class
A. C# B. J#
C. C D. C++

Answer: A

28. In C#, a subroutine is called a ________.


A. Metadata B. Method
C. Function D. Managed code

Answer: B

29. All C# applications begin execution by calling the _____ method.


A. Class() B. Submain()
C. Main() D. Namespace

Answer: C

30. A _______ is an identifier that denotes a storage location


A. Object B. Variable
C. Constant D. Reference type

Answer: B
31. _________ are reserved, and cannot be used as identifiers.
A. literal B. variables
C. Identifiers D. Keywords

Answer: D

32. Boxing converts a value type on the stack to an ______ on the heap.
A. Object type B. Class type
C. Bool type D. Instance type

Answer: A

33. The character pair ?: is a________________available in C#.


A. Unary operator B. Decision operator
C. Ternary operator D. Functional operator

Answer: C

34. In C#, all binary operators are ______.


A. Left-associative B. Right-associative
C. Top-associative D. Center-associative

Answer: A

35. An _______ is a symbol that tells the computer to perform certain mathematical or logical
manipulations.
A. Logic B. Expression
C. Operator D. Condition

Answer: C

36. A _____ is any valid C# variable ending with a colon.


A. goto B. Label
C. Logical D. Bitwise
Answer: B

37. C# has _______ operator, useful for making two way decisions.
A. Looping B. Functional
C. Exponential D. Conditional

Answer: D

38. ________causes the loop to continue with the next iteration after skipping any statements in
between.
A. Loop B. Exit
C. Break D. Continue

Answer: D

39. An ____ is a group of contiguous or related data items that share a common name.
A. Operator B. Integer
C. Exponential D. Array

Answer: D

40. Arrays in C# are ______ objects


A. Reference B. Logical
C. Value D. Arithmetic

Answer: A

41. Multidimensional arrays are sometimes called _______ Arrays.


A. Square B. Triangular
C. Rectangular D. Cube

Answer: C

42. _______ parameters are used to pass results back to the calling method.
A. Input B. Reference
C. Value D. Output

Answer: D

43. The formal-parameter-list is always enclosed in _______.


A. Square B. Semicolon
C. Parenthesis D. Colon

Answer: C

44. _______ variables are visible only in the block they are declared.
A. System B. Global
C. Local D. Console

Answer: C

45. C# does not support _____ constructors.


A. parameterized B. parameter-less
C. Class D. Method

Answer: B

46. A structure in C# provides a unique way of packing together data of ______ types.
A. Different B. Same
C. Invoking D. Calling

Answer: A

47. Struct’s data members are ____________ by default.


A. Protected B. Public
C. Private D. Default

Answer: C
48. A _______ creates an object by copying variables from another object.
A. Copy constructor B. Default constructor
C. Invoking constructor D. Calling constructor

Answer: A

49. The methods that have the same name, but different parameter lists and different definitions is
called______.
A. Method Overloading B. Method Overriding
C. Method Overwriting D. Method Overreading

Answer: A

50. The C# provides special methods known as _____ methods to provide access to data members.
A. Loop B. Functions
C. Methods D. Accessor

Answer: D

51. When an instance method declaration includes the abstract modifier, the method is said to be an
______.
A. Abstract method B. Sealed method
C. Instance method D. Expression method

Answer: A

52. The theory of _____ implies that user can control the access to a class, method, or variable.
A. Data hiding B. Information Hiding
C. Polymorphism D. Encapsulation

Answer: D

53. Inheritance is ______ in nature.


A. Commutative B. Associative
C. Transitive D. Iterative

Answer: C

54. The point at which an exception is thrown is called the _______.


A. Default point B. Invoking point
C. Calling point D. Throw point

Answer: D

55. In C#, having unreachable code is always an _____.


A. Method B. Function
C. Error D. Iterative

Answer: C

56. C# treats the multiple catch statements like cases in a _____________ statement.
A. If B. Switch
C. For D. While

Answer: B

57. C# supports a technique known as________, which allows a method to specify explicitly the name
of the interface it is implementing.
A. Method Implementaion B. Implicit Interface Implementation
C. Explicit Interface Implementation D. Iterative Interface Implementation

Answer: C

58. The reason that C# does not support multiple inheritances is because of ______.
A. Method collision B. Name collision
C. Function collision D. Interface collision

Answer: B
59. _______ is a set of devices through which a user communicates with a system using interactive set
of commands.
A. Console B. System
C. Keyboard D. Monitor

Answer: A

60. Exponential formatting character (‘E’ or ‘e’) converts a given value to string in the form of
_______.
A. m.dddd E+xxx B. m.dddd
C. E+xxx D. None of the above

Answer: A

61. The ______ are the Graphical User Interface (GUI) components created for web based
interactions.
A. Web forms B. Window Forms
C. Application Forms D. None of the above

Answer: B

62. In Microsoft Visual Studio, ______ technology and a programming language such as C# is used to
create a Web based application.
A. JAVA B. J#
C. VB.NET D. ASP.NET

Answer: D

63. The controls available in the tool box of the ______ are used to create the user interface of a web
based application.
A. Microsoft visual studio IDE B. Web forms
C. Application window D. None of the above

Answer: A

64. The infrastructure that supports these dynamic operations at run time is called the__________.
A. CLR B. CTS
C. CLS D. DLR

Answer: D

65. The___________keyword is new to C# 4.0, and is used to tell the compiler that a variable’s type
can change or that it is not known until runtime.
A. Covariance B. dynamic
C. Contravariance D. Object

Answer: B

66. _______ methods are not supported for dynamic types.


A. Anonymous B. Static
C. Abstract D. Extension

Answer: D

67. myMobile.Accept(55, inReject: false); Above statement is an example of which new concept of
C# 4.0?
A. Named Parameters B. Optional Parameters
C. dynamic D. Variance

Answer: A

68. COM Interop is simplified in C#4.0 e.g.var doc = Application.GetDocument(“MyFile.txt”); In


above statement_______ keyword was essential in parameters of GetDocument() in previous versions
of C#.
A. out B. named
C. base D. ref

Answer: D

69. ________parameters allows you to give a method parameter a default value so that you do not
have to specify it every time you call the method.
A. optional B. named
C. out D. ref

Answer: A

70. Duck typing is implemented by using_________ keyword.


A. dynamic B. object
C. ref D. base

Answer: A

71. Web Forms consists of a _______ and a _________ .


A. Template, Component B. CLR, CTS
C. HTML Forms, Web services D. Windows, desktop

Answer: A

72. The ______ parentheses that follow _____ indicate that no information is passed to Main ().
A. Empty, class B. Empty, submain
C. Empty, Main D. Empty, Namespace

Answer: C

73. What is the wild card character in the SQL “like” statement?
A. * B. #
C. % D. $

Answer: C

74. Which of the following is the root of the .NET type hierarchy?
A. System.Object B. System.Base
C. System.Root D. System.Parent

Answer: A
75. C# does not support:
A. abstraction B. polymorphism
C. multiple inheritance D. inheritance

Answer: C

76. Which of the following jobs are NOT performed by Garbage Collector?
A. Freeing memory on the stack. B. Closing unclosed database collections.
C. Closing unclosed files. D. All of these

Answer: D

77. Which of the following statements is correct about Managed Code?


A. Managed code is the code that runs on top of B. Managed code is the code that is written to
Windows. target the services of the CLR.
C. Managed code is the code where resources D. Managed code is the code that is compiled
are Garbage Collected. by the JIT compilers.

Answer: B

78. How does assembly versioning in .NET prevent DLL Hell?


A. The runtime checks to see that only one B. The compiler offers compile time checking
version of an assembly is on the machine at for backward compatibility.
any one time.
C. .NET allows assemblies to specify the name D. It doesn't.
AND the version of any assemblies they need
to run.

Answer: C

79. Which of the following is/are not types of arrays in C#?


A. Single-Dimensional B. Multidimensional
C. Jazzed arrays D. Jagged arrays

Answer: C

80. A variable which is declared inside a method is called a________variable


A. Local B. Private
C. Serial D. Static

Answer: A

81. Two methods with the same name but with different parameters.
A. Overloading B. Multiplexing
C. Duplexing D. Loading

Answer: A

82. Which file contains configuration data for each unique URl resource used in project?
A. web.config B. global.asax
C. assemblyinfo.cs D. webapplication.vsdisco

Answer: A

83. Features of Read only variables


A. Declaration and initialization is separated B. It is allocated at compile time
C. It is allocated at runtime D. all of the above

Answer: D

84. Different ways a method can be overloaded in C#.NET


A. Different parameter data types B. Different order of parameters
C. Different number of parameters D. All of above

Answer: D

85. Which of the following constitutes the .NET Framework?


A. CLR B. Framework Class Library
C. Both (a) and (b) D. Windows Services

Answer: C
86. Managed methods will be marked as ———— in MSIL code
A. mscorjit B. dgclr
C. cil D. None of the above

Answer: C

87. Identify which is true


A. DataView ia subset of row and not columns B. find can be done only on sorted columns
C. Sorting can be done on multiple columns D. None of these

Answer: A

88. Which of the following .NET components can be used to remove unused references from the
managed heap?
A. Class Loader B. Garbage Collector
C. CLR D. CTS

Answer: B

89. A local variable


A. Can be used anywhere in the program B. Is declared within a method
C. Must accept a class D. Represent a class object

Answer: B

90. An instance variable


A. is an object of a class B. represents an attribute of an object
C. is a method of a class D. none of these

Answer: B

91. Private Button print = new button();


A. creates a button control B. instantiates button control
C. both (a) and (b) D. none of these
Answer: C

92. An instance method


A. Represents the behavior of an object B. Represents the attribute of an object
C. Represents another class D. None of these

Answer: A

93. A Constructor
A. is used to create objects B. must have the same name as the class it is
declared within
C. is a method of a class D. all of these

Answer: D

94. class Test: Form { }


A. Creates the class Test : Form B. Creates the class Test that inherits the class
Form
C. Creates the class form that inherits the class D. None of these
Test

Answer: B

95. A variable declared inside a method is called a________variable


A. Static B. Private
C. Local D. Serial

Answer: C

96. Defining two methods with the same name but with different parameters is called.
A. Loading B. Overloading
C. Multiplexing D. Duplexing

Answer: B
97. Find any errors in the following BankAccount constructor: Public int BankAccount() { balance =
0; }
A. Name B. Formal parameters
C. Return type D. No errors

Answer: C

98. In the body of a method, C# uses the variable named_____to refer to the current object whose
method is being invoked
A. call B. this
C. do D. that

Answer: B

99. String mystring; Creates a(n)


A. class B. Constructor
C. Object D. None of these

Answer: C

100. An Event is
A. The result of a users action B. result of a party
C. code to force users action D. none of these

Answer: A

Das könnte Ihnen auch gefallen