Gkindiaonline.com
Gkindiaonline.com
Gkindiaonline.com
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
Answer: C
Answer: C
Answer: A
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
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
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
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
Answer: 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
Answer: A
Answer: D
Answer: B
Answer: A
27. The ____ language allows more than one method in a single class
A. C# B. J#
C. C D. C++
Answer: A
Answer: B
Answer: C
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
Answer: C
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
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
Answer: A
Answer: C
42. _______ parameters are used to pass results back to the calling method.
A. Input B. Reference
C. Value D. Output
Answer: D
Answer: C
44. _______ variables are visible only in the block they are declared.
A. System B. Global
C. Local D. Console
Answer: C
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
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
Answer: C
Answer: D
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
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
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
Answer: A
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
Answer: B
Answer: C
Answer: C
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
Answer: D
Answer: D
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
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
Answer: B
Answer: B
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
Answer: B
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
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