McqMate
These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Information Technology Engineering (IT) , Programming Languages .
1. |
A variable which is declared inside a method is called? |
A. | Serial |
B. | Local |
C. | Private |
D. | Static |
Answer» B. Local |
2. |
Feature of a local variable? |
A. | It can be used anywhere in the program |
B. | It must accept a class |
C. | It must be declared within a metho |
D. | D It represent a class object |
Answer» C. It must be declared within a metho |
3. |
Two methods with the same name but with different parameters? |
A. | Overloading |
B. | Loading |
C. | Multiplexing |
D. | Duplexing |
Answer» A. Overloading |
4. |
What is the output of the code public class B: A { }? |
A. | Errors |
B. | It defines a class that inherits the public methods of A only |
C. | It defines a class that inherits all the methods of A but the private members cannot be accesse |
D. | D Both b and c |
Answer» C. It defines a class that inherits all the methods of A but the private members cannot be accesse |
5. |
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. |
6. |
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. | Common Type System |
Answer» A. .NET class libraries |
7. |
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. | CTS |
Answer» C. Garbage Collector |
8. |
Which of the following assemblies can be stored in Global Assembly Cache? |
A. | Private Assemblies |
B. | Public Assemblies |
C. | Shared Assemblies |
D. | Protected Assemblies |
Answer» C. Shared Assemblies |
9. |
Code that targets the Common Language Runtime is known as |
A. | Unmanaged |
B. | Distributed |
C. | Native Code |
D. | Managed Code |
Answer» D. Managed Code |
10. |
Which of the following is the root of the .NET type hierarchy? |
A. | System.Object |
B. | System.Type |
C. | System.Base |
D. | System.Root |
Answer» A. System.Object |
11. |
Which of the following are parts of the .NET Framework? |
A. | CLR & Framework Class Libraries (FCL) |
B. | Mobile Applications |
C. | Microsoft Published Web Services |
D. | Applications deployed on IIS |
Answer» A. CLR & Framework Class Libraries (FCL) |
12. |
int keyword targets to which .Net type? |
A. | System.Int8 |
B. | System.Int16 |
C. | System.Int32 |
D. | System.Int64 |
Answer» C. System.Int32 |
13. |
How many web.config files that can be there an ASP.NET application? |
A. | Only One |
B. | Only Two |
C. | Upto 10 |
D. | More than one |
Answer» A. Only One |
14. |
The RangeValidator control supports the following data types? |
A. | Integer only |
B. | Date, Integer and String |
C. | Only String |
D. | Date and Interger |
Answer» B. Date, Integer and String |
15. |
How to kill a user session explicitly? |
A. | Session.Close() |
B. | Session.Discard() |
C. | Session.kill() |
D. | Session.Abandon() |
Answer» D. Session.Abandon() |
16. |
Different ways a method can be overloaded in C#.NET? |
A. | Different parameter data types |
B. | Different number of parameters |
C. | Different order of parameters |
D. | All of the Above |
Answer» D. All of the Above |
17. |
Can you store multiple data types in System.Array? |
A. | No |
B. | Yes |
C. | Both |
D. | None |
Answer» A. No |
18. |
Can you inherit multiple interfaces? |
A. | Yes |
B. | No |
C. | Both |
D. | None |
Answer» A. Yes |
19. |
What are the basic techniques for creating a control? |
A. | Inheriting from an existing control |
B. | Inherit from User Control |
C. | Inherit from Control |
D. | All of above |
Answer» D. All of above |
20. |
All control inherits either directly or indirectly from the base class control? |
A. | Yes |
B. | No |
C. | Both |
D. | None |
Answer» A. Yes |
21. |
Which of the following can`t be used in our .NET application? |
A. | .Net Assemblies |
B. | ActiveX Control |
C. | COM type libraries |
D. | All of the above can be used |
Answer» D. All of the above can be used |
22. |
Which access modifiers are used in the concept of a property? |
A. | Get / set |
B. | Try / catch |
C. | Finally/throw |
D. | None of the above |
Answer» A. Get / set |
23. |
Choose the form in which Postback occurs? |
A. | Html |
B. | Webforms |
C. | Windows |
D. | All of above |
Answer» B. Webforms |
24. |
Web.config file is used? |
A. | Configures the time that the server-side code behind module is called |
B. | To store the global information and variable definitions for the application |
C. | To configure the web server |
D. | To configure the web browser |
Answer» C. To configure the web server |
25. |
The first event triggers in an aspx page is? |
A. | Page_Init() |
B. | Page_Load() |
C. | Page_Click() |
D. | All of the above |
Answer» A. Page_Init() |
26. |
What is used to validate complex string patterns like an e-mail address? |
A. | Required Field Validator |
B. | Range Validator |
C. | Regular Expression Validator |
D. | Custom Validator |
Answer» C. Regular Expression Validator |
27. |
Which of the following statements is correct about constructors? |
A. | If we provide a one-argument constructor then the compiler still provides a zero-argument constructor. |
B. | Static constructors can use optional arguments. |
C. | Overloaded constructors cannot use optional arguments. |
D. | If we do not provide a constructor, then the compiler provides a zeroargument constructor. |
Answer» D. If we do not provide a constructor, then the compiler provides a zeroargument constructor. |
28. |
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. | Any number of times before the object gets garbage collected. |
D. | Any number of times before the object is deleted. |
Answer» B. Only once. |
29. |
A property can be declared inside a class, struct, Interface. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» A. True |
30. |
A property can be declared inside a namespace or a procedure. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False |
31. |
Which of the following statements is correct about properties used in C#.NET? |
A. | Every property must have a set accessor and a get accessor. |
B. | Properties cannot be overloaded. |
C. | Properties of a class are actually methods that work like data members. |
D. | A property has to be either read only or a write only. |
Answer» C. Properties of a class are actually methods that work like data members. |
32. |
Which of the following is NOT a .NET Exception class? |
A. | Exception |
B. | StatckMemoryException |
C. | DivideByZeroException |
D. | OutofMemoryException |
Answer» B. StatckMemoryException |
33. |
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 loading of the program. |
Answer» C. It occurs at run-time. |
34. |
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. CLR |
35. |
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. Exceptions |
36. |
Exceptions can be thrown even from a constructor, whereas error codes cannot be returned from a constructor. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» A. True |
37. |
All code inside finally block is guaranteed to execute irrespective of whether an exception occurs in the protected block or not. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» A. True |
38. |
It is compulsory for all classes whose objects can be thrown with throw statement to be derived from System.Exception class. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False |
39. |
Which of the following is NOT an Exception? |
A. | Stack Overflow |
B. | Division By Zero |
C. | Insufficient Memory |
D. | Incorrect Arithmetic Expression |
Answer» D. Incorrect Arithmetic Expression |
40. |
Which of the following is NOT a namespace in the .NET Framework Class Library? |
A. | System.Process |
B. | System.Security |
C. | System.Threading |
D. | System.Drawing |
Answer» A. System.Process |
41. |
Which of the following statements is correct about a namespace in C#.NET? |
A. | Namespaces help us to control the visibility of the elements present in it. |
B. | A namespace can contain a class but not another namespace. |
C. | If not mentioned, then the name 'root' gets assigned to the namespace. |
D. | It is necessary to use the using statement to be able to use an element of a namespace. |
Answer» A. Namespaces help us to control the visibility of the elements present in it. |
42. |
Which of the following CANNOT belong to a C#.NET Namespace? |
A. | Class |
B. | Struct |
C. | Enum |
D. | Data |
Answer» D. Data |
43. |
Which of the following statements is correct about a namespace used in C#.NET? |
A. | Nested namespaces are not allowed. |
B. | Importing outer namespace imports inner namespace. |
C. | Nested namespaces are allowed. |
D. | If nested, the namespaces cannot be split across files. |
Answer» C. Nested namespaces are allowed. |
44. |
Which of the following denote the web control associated with Table control function of ASP.NET? |
A. | DataList |
B. | ListBox |
C. | TableRow |
D. | All the above |
Answer» C. TableRow |
45. |
ASP.NET separates the HTML output from program logic using a feature named as |
A. | Exception |
B. | Code-behind |
C. | Code-front |
D. | None of the above |
Answer» B. Code-behind |
46. |
If a developer of ASP.NET defines style information in a common location. Then that location is called as |
A. | Master Page |
B. | Theme |
C. | Customization |
D. | None of the above |
Answer» B. Theme |
47. |
The feature in ASP.NET 2.0 that is used to fire a normal postback to a different page in the application is called |
A. | Theme |
B. | Cross page posting |
C. | Code-front |
D. | None of the above |
Answer» B. Cross page posting |
48. |
The GridView control in ASP.NET has which of the following features |
A. | Automatic data binding |
B. | Automatic paging |
C. | Both A and B |
D. | None of the above |
Answer» C. Both A and B |
49. |
Which of the following denote page code model in ASP.NET? |
A. | Single File |
B. | Code Behind |
C. | Both A and B |
D. | None of the above |
Answer» C. Both A and B |
50. |
Which of the following denote New Data-bound Controls used with ASP.NET? |
A. | GridView |
B. | SqlDataSource |
C. | FormView |
D. | All of the above |
Answer» D. All of the above |
Done Studing? Take A Test.
Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.