McqMate
1. |
Which of the following statements are TRUE about the .NET CLR?
|
A. | Only 1 and 2 |
B. | Only 1,2 and 4 |
C. | 1,2,3,4 |
D. | Only 4 and 5 |
Answer» C. 1,2,3,4 |
2. |
Which of the following are valid .NET CLR JIT performance counters?
|
A. | 1,5 |
B. | 3,4 |
C. | 1,2 |
D. | 4,5 |
Answer» B. 3,4 |
3. |
Which of the following statements is correct about Managed Code? |
A. | Managed code is the code that is compiled by the JIT compilers. |
B. | Managed code is the code where resources are Garbage Collected. |
C. | Managed code is the code that runs on top of Windows. |
D. | Managed code is the code that is written to target the services of the CLR. |
Answer» D. Managed code is the code that is written to target the services of the CLR. |
4. |
Which of the following are NOT true about .NET Framework?
|
A. | 1,2 |
B. | 2,4 |
C. | 4,5 |
D. | 1,2,4 |
Answer» C. 4,5 |
5. |
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. | NET class libraries |
B. | Common Language Runtime |
C. | Common Language Infrastructure |
D. | Component Object Model |
Answer» A. NET class libraries |
6. |
Which of the following .NET components can be used to remove unused references from the managed heap? |
A. | Common Language Infrastructure |
B. | CLR |
C. | Garbage Collector |
D. | Class Loader |
Answer» C. Garbage Collector |
7. |
Which of the following statements correctly define .NET Framework? |
A. | It is an environment for developing, building, deploying and executing Desktop Applications, Web Applications and Web Services |
B. | It is an environment for developing, building, deploying and executing only Web Applications. |
C. | It is an environment for developing, building, deploying and executing Distributed Applications. |
D. | It is an environment for developing, building, deploying and executing Web Services. |
Answer» A. It is an environment for developing, building, deploying and executing Desktop Applications, Web Applications and Web Services |
8. |
Which of the following constitutes the .NET Framework?
|
A. | 1,2 |
B. | 2,3 |
C. | 3,4 |
D. | 2,5 |
Answer» B. 2,3 |
9. |
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. Shared Assemblies |
10. |
Code that targets the Common Language Runtime is known as |
A. | Unmanaged |
B. | Distributed |
C. | Legacy |
D. | Managed code |
Answer» D. Managed code |
11. |
Which of the following statements is correct about the .NET Framework? |
A. | NET Framework uses DCOM for achieving language interoperability. |
B. | NET Framework is built on the DCOM technology. |
C. | NET Framework uses DCOM for making transition between managed and unmanaged code. |
D. | NET Framework uses DCOM for creating unmanaged applications. |
Answer» C. NET Framework uses DCOM for making transition between managed and unmanaged code. |
12. |
Which of the following benefits do we get on running managed code under CLR?
|
A. | Only 1 and 2 |
B. | Only 2, 3 and 4 |
C. | Only 1, 3 and 4 |
D. | All of the above |
Answer» D. All of the above |
13. |
Which of the following jobs are done by Common Language Runtime?
|
A. | Only 1 and 2 |
B. | Only 3 and 4 |
C. | Only 1, 3 and 4 |
D. | All of the above |
Answer» D. All of the above |
14. |
Which of the following statements are correct about a .NET Assembly?
|
A. | 1,2,3 |
B. | 2,4,5 |
C. | 1,3,5 |
D. | 1,2 |
Answer» D. 1,2 |
15. |
Which of the following statements are correct about JIT?
|
A. | 1, 2, 3 |
B. | 2,4 |
C. | 3,4,5 |
D. | 1,2 |
Answer» A. 1, 2, 3 |
16. |
Which of the following are parts of the .NET Framework?
|
A. | Only 1, 2, 3 |
B. | Only 1, 2 |
C. | Only 1, 2, 4 |
D. | Only 4,5 |
Answer» B. Only 1, 2 |
17. |
In C#, a subroutine is called a ________. |
A. | Function |
B. | Metadata |
C. | Method |
D. | Managed code |
Answer» C. Method |
18. |
All C# applications begin execution by calling the _____ method. |
A. | Class() |
B. | Main() |
C. | Submain() |
D. | Namespace |
Answer» B. Main() |
19. |
A _______ is an identifier that denotes a storage location |
A. | Constant |
B. | Reference type |
C. | Variable |
D. | Object |
Answer» C. Variable |
20. |
_________ are reserved, and cannot be used as identifiers. |
A. | Keywords |
B. | literal |
C. | variables |
D. | Identifiers |
Answer» A. Keywords |
21. |
Boxing converts a value type on the stack to an ______ on the heap. |
A. | Bool type |
B. | Instance type |
C. | Class type |
D. | Object type |
Answer» D. Object type |
22. |
The character pair?: is an________________available in C#. |
A. | Unary operator |
B. | Ternary operator |
C. | Decision operator |
D. | Functional operator |
Answer» B. Ternary operator |
23. |
In C#, all binary operators are ______. |
A. | Center-associative |
B. | Right-associative |
C. | Left-associative |
D. | Top-associative |
Answer» C. Left-associative |
24. |
An _______ is a symbol that tells the computer to perform certain mathematical or logical manipulations. |
A. | Operator |
B. | Expression |
C. | Condition |
D. | Logic |
Answer» A. Operator |
25. |
A _____ is any valid C# variable ending with a colon. |
A. | goto |
B. | Label |
C. | Logical |
D. | Bitwise |
Answer» B. Label |
26. |
C# has _______ operator, useful for making two way decisions. |
A. | Looping |
B. | Functional |
C. | Exponential |
D. | Conditional |
Answer» D. Conditional |
27. |
________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. Continue |
28. |
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. Array |
29. |
Arrays in C# are ______ objects |
A. | Reference |
B. | Logical |
C. | Value |
D. | Arithmetic |
Answer» A. Reference |
30. |
Multidimensional arrays are sometimes called _______ Arrays. |
A. | Square |
B. | Triangular |
C. | Rectangular |
D. | Cube |
Answer» C. Rectangular |
31. |
Which of the following define the rules for .Net Languages? |
A. | GAC |
B. | CLS |
C. | CTS |
D. | CLR |
Answer» B. CLS |
32. |
___________ namespace is not defined in the .NET class library. |
A. | System.CodeDom |
B. | System |
C. | System.IO |
D. | System.Text |
Answer» A. System.CodeDom |
33. |
Dot Net Framework consists of : |
A. | Common language runtime |
B. | Set of class libraries |
C. | Common language runtime and set of class libraries |
D. | None of above |
Answer» C. Common language runtime and set of class libraries |
34. |
Which of the following statements are correct about JIT?
|
A. | 1,2,3 |
B. | 2,4 |
C. | 3,4 |
D. | 1,2 |
Answer» A. 1,2,3 |
35. |
Which of the following is the root of the .NET type hierarchy? |
A. | System.Type |
B. | System.Base |
C. | System.Parent |
D. | System.Object |
Answer» D. System.Object |
36. |
Code that targets the Common Language Runtime is known as |
A. | Unmanaged |
B. | Distributed |
C. | Managed Code |
D. | Native Code |
Answer» C. Managed Code |
37. |
Which of the following statements correctly define .NET Framework? |
A. | It is an environment for developing, building, deploying and executing Desktop Applications, Web Applications and Web Services. |
B. | It is an environment for developing, building, deploying and executing only Web Applications. |
C. | It is an environment for developing, building, deploying and executing Distributed Applications. |
D. | It is an environment for developing, building, deploying and executing Web Services. |
Answer» A. It is an environment for developing, building, deploying and executing Desktop Applications, Web Applications and Web Services. |
38. |
How many types of compilers availbale under CLR? |
A. | 4 |
B. | 2 |
C. | 1 |
D. | 3 |
Answer» D. 3 |
39. |
Which of the following utilities can be used to compile managed assemblies into processor-specific native code? |
A. | gacutil |
B. | ngen |
C. | sn |
D. | ildasm |
Answer» B. ngen |
40. |
Which of the following statements are correct about data types?
|
A. | 1,3,5 |
B. | 2,4 |
C. | 3,5 |
D. | 1,2,5 |
Answer» D. 1,2,5 |
41. |
Which of the following is NOT an Integer? |
A. | Char |
B. | Byte |
C. | Integer |
D. | Long |
Answer» A. Char |
42. |
What will be the output of the following code snippet when it is executed?
|
A. | 0.1 |
B. | 1.0 |
C. | 1.1 |
D. | 11 |
Answer» A. 0.1 |
43. |
Which of the following is the correct size of a Decimal datatype? |
A. | 8 bytes |
B. | 4 bytes |
C. | 10 bytes |
D. | None of the above |
Answer» D. None of the above |
44. |
Which of the following statements are correct?
|
A. | 2,5 |
B. | 1,5 |
C. | 3,4 |
D. | 2,3 |
Answer» B. 1,5 |
45. |
Which of the following is the correct ways to set a value 3.14 in a variable pi such that it cannot be modified? |
A. | float pi = 3.14F; |
B. | #define pi 3.14F; |
C. | const float pi = 3.14F; |
D. | const float pi; pi = 3.14F; |
Answer» C. const float pi = 3.14F; |
46. |
Which of the following can be used to terminate a while loop and transfer control outside the loop?
|
A. | 1,3 |
B. | 2,4 |
C. | 3,5 |
D. | 4,5 |
Answer» D. 4,5 |
47. |
Which of the following statements are correct about the C#.NET
|
A. | 1,3 |
B. | 2,5 |
C. | 1,4,5, |
D. | 3,4,5 |
Answer» C. 1,4,5, |
48. |
Which of the following is the correct output for the C#.NET code snippet given below? Console.WriteLine(13 / 2 + " " + 13 % 2); |
A. | 6.5 1 |
B. | 6.5 0 |
C. | 6 0 |
D. | 6 1 |
Answer» D. 6 1 |
49. |
Which of the following statements are correct?
|
A. | 1,3,5 |
B. | 2,4 |
C. | 3,5 |
D. | 2,4,5 |
Answer» A. 1,3,5 |
50. |
Which of the following is the correct way to create an object of the class Sample?
|
A. | 1,3 |
B. | 2,4 |
C. | 1,2,3 |
D. | 4,5 |
Answer» A. 1,3 |
51. |
Which of the following statements is correct about constructors? |
A. | If we provide a one-argument constructor then the compiler still provides a zeroargument constructor. |
B. | Overloaded constructors have the same name as the class name |
C. | Overloaded constructors cannot use optional arguments. |
D. | If we do not provide a constructor, then the compiler provides a zero-argument constructor. |
Answer» D. If we do not provide a constructor, then the compiler provides a zero-argument constructor. |
52. |
Which of the following statements is correct? |
A. | There is one garbage collector per program running in memory. |
B. | There is one common garbage collector for all programs. |
C. | An object is destroyed by the garbage collector when only one reference refers to it. |
D. | We have to specifically run the garbage collector after executing Visual Studio.NET. |
Answer» B. There is one common garbage collector for all programs. |
53. |
Which of the following can be facilitated by the Inheritance mechanism?
|
A. | 1,2,3 |
B. | 3,4 |
C. | 2,4,5 |
D. | 3,5 |
Answer» A. 1,2,3 |
54. |
Which one of the following statements is correct? |
A. | Array elements can be of integer type only. |
B. | The rank of an Array is the total number of elements it can contain. |
C. | The length of an Array is the number of dimensions in the Array. |
D. | The default value of numeric array elements is zero. |
Answer» D. The default value of numeric array elements is zero. |
55. |
Which of the following statements are correct about arrays used in C#.NET?
|
A. | 1,2 |
B. | 1,3,5 |
C. | 3,4 |
D. | 1,2,5 |
Answer» D. 1,2,5 |
56. |
Which of the following statements are correct?
|
A. | 1,2 |
B. | 3,4 |
C. | 1,2,4 |
D. | 3,5 |
Answer» A. 1,2 |
57. |
Which of the following will be the correct output for the C#.NET code snippet given below?
|
A. | ARE |
B. | CRE |
C. | CR |
D. | REA |
Answer» B. CRE |
58. |
If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references? |
A. | s1 is s2 |
B. | s1=s2 |
C. | s1==s2 |
D. | s1.Equals(s2) |
Answer» D. s1.Equals(s2) |
59. |
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. It occurs at run-time. |
60. |
Which of the following statements are correct about exception handling in C#.NET?
|
A. | 1 only |
B. | 2 only |
C. | 2 and 5 only |
D. | 3 and 4 only |
Answer» C. 2 and 5 only |
61. |
______ parameters are used to pass results back to the calling method. |
A. | Input |
B. | Reference |
C. | Value |
D. | Output |
Answer» D. Output |
62. |
The formal-parameter-list is always enclosed in _______. |
A. | Square |
B. | Semicolon |
C. | Parenthesis |
D. | Colon |
Answer» C. Parenthesis |
63. |
_______ variables are visible only in the block they are declared. |
A. | System |
B. | Global |
C. | Local |
D. | Console |
Answer» C. Local |
64. |
C# does not support _____ constructors. |
A. | parameterized |
B. | parameter-less |
C. | Class |
D. | Method |
Answer» B. parameter-less |
65. |
A structure in C# provides a unique way of packing together data of ______ types. |
A. | Different |
B. | Same |
C. | Invoking |
D. | Calling |
Answer» A. Different |
66. |
Struct’s data members are ____________ by default. |
A. | Protected |
B. | Public |
C. | Private |
D. | Default |
Answer» C. Private |
67. |
A _______ creates an object by copying variables from another object. |
A. | Copy constructor |
B. | Default constructor |
C. | Invoking constructor |
D. | Calling constructor |
Answer» A. Copy constructor |
68. |
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. Method Overloading |
69. |
The C# provides special methods known as _____ methods to provide access to data members. |
A. | Loop |
B. | Functions |
C. | Methods |
D. | Accessor |
Answer» D. Accessor |
70. |
Storage location used by computer memory to store data for usage by an application is ? |
A. | Pointers |
B. | Constants |
C. | Variable |
D. | None of the mentioned |
Answer» C. Variable |
71. |
Which of these can be overloaded? |
A. | Constructors |
B. | Methods |
C. | Both a & b |
D. | None of the mentioned |
Answer» C. Both a & b |
72. |
Number of constructors a class can define of ? |
A. | 1 |
B. | 2 |
C. | Any number |
D. | None of the mentioned |
Answer» C. Any number |
73. |
Correct statement about constructors in C#.NET is ? |
A. | Constructor cannot be overloaded |
B. | Constructor allocate space for object in memory |
C. | Constructor are never called explicitly |
D. | Constructor have same name as name of the class |
Answer» D. Constructor have same name as name of the class |
74. |
Constructors are used to |
A. | initialize the objects |
B. | construct the data members |
C. | both a & b |
D. | None of the mentioned |
Answer» C. both a & b |
75. |
To overload a method which of the following statement is false? |
A. | If the return type is different methods are overloaded |
B. | Name of the overloaded method should be same |
C. | Type of the parameter should be different |
D. | Order of the parameter should be different if types are same |
Answer» A. If the return type is different methods are overloaded |
76. |
Which of the following statements is correct about constructors in C#.NET? |
A. | A constructor cannot be declared as private |
B. | A constructor cannot be overloaded |
C. | A constructor can be a static constructor |
D. | None of the mentioned |
Answer» D. None of the mentioned |
77. |
What is return type of constructors? |
A. | int |
B. | float |
C. | void |
D. | None of the mentioned |
Answer» D. None of the mentioned |
78. |
Which method have same name as that of its class? |
A. | delete |
B. | class |
C. | constructor |
D. | None of mentioned |
Answer» C. constructor |
79. |
Which of following statement are correct about functions? |
A. | C# allows a function to have arguments with default values |
B. | Redefining a method parameter in the method’s body causes an exception |
C. | C# allows function to have arguments of private type |
D. | Omitting the return type in method definition results into exception |
Answer» A. C# allows a function to have arguments with default values |
80. |
Which of the following statements are correct about an ArrayList collection that
|
A. | 1 and 2 only |
B. | 1,3 and 4 only |
C. | 2 and 5 only |
D. | None of the above |
Answer» B. 1,3 and 4 only |
81. |
How many enumerators will exist if four threads are simultaneously working on an ArrayList object? |
A. | 1 |
B. | 3 |
C. | 2 |
D. | 4 |
Answer» D. 4 |
82. |
In which of the following collections is the Input/Output index-based? 1. Stack 2. Queue 3. BitArray 4. ArrayList 5. HashTable |
A. | 1 and 2 only |
B. | 3 and 4 only |
C. | 5 only |
D. | 1, 2 and 5 only |
Answer» B. 3 and 4 only |
83. |
Which of the following statements are correct about the Stack collection?
|
A. | 1 and 2 only |
B. | 3 and 4 only |
C. | 1, 2 and 5 only |
D. | All of the above |
Answer» C. 1, 2 and 5 only |
84. |
Which of the following is the correct way to access all elements of the Queue collection created using the C#.NET code snippet given below? Queue q = new Queue(); q.Enqueue("Sachin"); q.Enqueue('A'); q.Enqueue(false); q.Enqueue(38); q.Enqueue(5.4); |
A. | IEnumerator e; e = q.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current); |
B. | IEnumerable e; e = q.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current); |
C. | IEnumerator e; e = q.GetEnumerable(); while (e.MoveNext()) Console.WriteLine(e.Current); |
D. | IEnumerator e; e = Queue.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current); |
Answer» A. IEnumerator e; e = q.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current); |
85. |
Which of the following statements is incorrect about delegate? |
A. | Delegates are reference types. |
B. | Delegates are object oriented. |
C. | Delegates are type-safe. |
D. | Only one method can be called using a delegate. |
Answer» D. Only one method can be called using a delegate. |
86. |
Which of the following statements are correct about the delegate declaration given below? delegate void del(int I);
|
A. | 1, 2 and 3 only |
B. | 1, 3 and 5 only |
C. | 2 and 4 only |
D. | 4 only |
Answer» B. 1, 3 and 5 only |
87. |
Suppose a Generic class called SortObjects is to be made capable of sorting objects of any type (Integer, Single, Byte etc.). Which of the following programming constructs should be used to implement the comparison function? |
A. | Namespace |
B. | Interface |
C. | Encapsulation |
D. | Delegate |
Answer» D. Delegate |
88. |
What is a delegate? |
A. | A strongly typed function pointer. |
B. | A light weight thread or process that can call a single method. |
C. | A reference to an object in a different process. |
D. | An inter-process message channel. |
Answer» A. A strongly typed function pointer. |
89. |
Which of the following is included in Visual Studio IDE? |
A. | Form Designer |
B. | Code Editor |
C. | Solution Explorer |
D. | All of the above |
Answer» D. All of the above |
90. |
Which of the following is true about dispose() method? |
A. | This method is protected. |
B. | Its return type is int. |
C. | It accepts a float parameter. |
D. | All of the above. |
Answer» A. This method is protected. |
91. |
Button class derives from |
A. | Checkbox |
B. | RadioButton |
C. | ButtonBase |
D. | None of the above |
Answer» C. ButtonBase |
92. |
Which namespace includes most of the Control classes for developing Windows applications? |
A. | System; |
B. | System.Windows.Controls |
C. | System.Windows.Components.Forms |
D. | System.Windows.Forms |
Answer» C. System.Windows.Components.Forms |
93. |
Which of the Control objects is viewed as a container that can hold other objects when you design a Windows application? |
A. | Control |
B. | Button |
C. | Window |
D. | Form |
Answer» D. Form |
94. |
When an instance method declaration includes the abstract modifier, the method is said to be an ______. |
A. | Abstract method |
B. | Instance method |
C. | Sealed method |
D. | Expression method |
Answer» A. Abstract method |
95. |
The theory of _____ implies that user can control the access to a class, method, or variable. |
A. | Data hiding |
B. | Encapsulation |
C. | Information Hiding |
D. | Polymorphism |
Answer» B. Encapsulation |
96. |
Inheritance is ______ in nature. |
A. | Commutative |
B. | Associative |
C. | Transitive |
D. | Iterative |
Answer» C. Transitive |
97. |
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. Throw point |
98. |
In C#, having unreachable code is always an _____. |
A. | Method |
B. | Function |
C. | Error |
D. | Iterative |
Answer» C. Error |
99. |
C# treats the multiple catch statements like cases in a _____________ statement. |
A. | If |
B. | Switch |
C. | For |
D. | While |
Answer» B. Switch |
100. |
C# supports a technique known as________, which allows a method to specify explicitly the name of the interface it is implementing. |
A. | Method Implementation |
B. | Implicit Interface Implementation |
C. | Explicit Interface Implementation |
D. | Iterative Interface Implementation |
Answer» C. Explicit Interface Implementation |
Done Reading?