

MCQOPTIONS
Saved Bookmarks
This section includes 120 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
A record is a |
A. | index that locates information in a table. |
Answer» E. | |
2. |
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» D. System.Windows.Forms | |
3. |
Which of the following jobs are done by Common Language Runtime? 1. It provides core services such as memory management, thread management, and remoting. 2. It enforces strict type safety. 3. It provides Code Access Security. 4. It provides Garbage Collection Services. |
A. | Only 1 and 2 |
B. | Only 3 and 4 |
C. | Only 1, 3 and 4 |
D. | All of the above |
Answer» E. | |
4. |
A _______ creates an object by copying variables from another object. |
A. | Copy constructor |
B. | Default constructor |
C. | Invoking constructor |
D. | Calling constructor |
Answer» B. Default constructor | |
5. |
Multidimensional arrays are sometimes called _______ Arrays. |
A. | Square |
B. | Triangular |
C. | Rectangular |
D. | Cube |
Answer» D. Cube | |
6. |
Which of the following statements are correct about a .NET Assembly? 1. It is the smallest deployable unit. 2. Each assembly has only one entry point - Main(), WinMain() or DLLMain(). 3. An assembly can be a Shared assembly or a Private assembly. 4. An assembly can contain only code and data. 5. An assembly is always in the form of an EXE file. |
A. | 1,2,3 |
B. | 2,4,5 |
C. | 1,3,5 |
D. | 1,2 |
Answer» E. | |
7. |
The field in the child table that links information to the parent table is known as the |
A. | Foreign key. |
B. | Primary key. |
C. | Tertiary key. |
D. | Secondary key. |
Answer» B. Primary key. | |
8. |
The ______ are the Graphical User Interface (GUI) components created for web basedinteractions.. |
A. | Web forms |
B. | Window Forms |
C. | Application Forms |
D. | None of the above |
Answer» C. Application Forms | |
9. |
The scope of a variable depends on the ____________ and _________. |
A. | Main method, place of its declaration |
B. | Type of the variable, console |
C. | compiler, main |
D. | Type of the variable, place of its declaration |
Answer» C. compiler, main | |
10. |
The C# provides special methods known as _____ methods to provide access to data members. |
A. | Loop |
B. | Functions |
C. | Methods |
D. | Accessor |
Answer» E. | |
11. |
A computer application for managing databases and pulling together data to generate reports and make decisions is known as a(n) |
A. | Database System (DS). |
B. | File Manager (FM). |
C. | Management System (MS). |
D. | Database Management System (DBMS). |
Answer» E. | |
12. |
In C#, a subroutine is called a ________. |
A. | Function |
B. | Metadata |
C. | Method |
D. | Managed code |
Answer» D. Managed code | |
13. |
In C#, having unreachable code is always an _____. |
A. | Method |
B. | Function |
C. | Error |
D. | Iterative |
Answer» D. Iterative | |
14. |
Which of the following statements are correct about an ArrayList collection thatimplements the IEnumerable interface? 1. The ArrayList class contains an inner class that implements the IEnumerator interface. 2. An ArrayList Collection cannot be accessed simultaneously by different threads. 3. The inner class of ArrayList can access ArrayList class's members. 4. To access members of ArrayList from the inner class, it is necessary to pass ArrayList class's reference to it. 5. Enumerator's of ArrayList Collection can manipulate the array. |
A. | 1 and 2 only |
B. | 1,3 and 4 only |
C. | 2 and 5 only |
D. | None of the above |
Answer» C. 2 and 5 only | |
15. |
How many types of compilers availbale under CLR? |
A. | 4 |
B. | 2 |
C. | 1 |
D. | 3 |
Answer» E. | |
16. |
The character pair?: is an________________available in C#. |
A. | Unary operator |
B. | Ternary operator |
C. | Decision operator |
D. | Functional operator |
Answer» C. Decision operator | |
17. |
___________ namespace is not defined in the .NET class library. |
A. | System.CodeDom |
B. | System |
C. | System.IO |
D. | System.Text |
Answer» B. System | |
18. |
Why does Visual Studio.NET use XML as a data storage technology? |
A. | XML works best for the single PC user. |
B. | XML restricts the number of applications that can interface with Visual Basic.NET. |
C. | XML is optimized for sharing data across the Internet. |
D. | XML is easier to understand than Visual Basic.NET. |
Answer» D. XML is easier to understand than Visual Basic.NET. | |
19. |
Which of the following characterizes the relational model for databases? |
A. | It organizes data into a hierarchal format. |
B. | It splits data into separate row and column areas called tables. |
C. | It organizes data into one large table. |
D. | It organizes data into a network format. |
Answer» C. It organizes data into one large table. | |
20. |
What is return type of constructors? |
A. | int |
B. | float |
C. | void |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
21. |
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» E. | |
22. |
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» C. Function collision | |
23. |
The following namespaces (System.Data.OleDB, System.Data.SqlClient, System.Data.Odbc, System.Data.OracleClient) include classes for different: |
A. | Data providers |
B. | File streams |
C. | ADO.NET applications |
D. | Databases |
Answer» B. File streams | |
24. |
All C# applications begin execution by calling the _____ method. |
A. | Class() |
B. | Main() |
C. | Submain() |
D. | Namespace |
Answer» C. Submain() | |
25. |
Which of the following statements are correct? 1. A struct can contain properties. 2. A struct can contain constructors. 3. A struct can contain protected data members. 4. A struct cannot contain methods. 5. A struct cannot contain constants. |
A. | 1,2 |
B. | 3,4 |
C. | 1,2,4 |
D. | 3,5 |
Answer» B. 3,4 | |
26. |
Web Forms consists of a _______ and a _________ . |
A. | Template, Component |
B. | CLR, CTS |
C. | HTML Forms, Web services |
D. | Windows, desktop |
Answer» B. CLR, CTS | |
27. |
Which of the following statements are correct about exception handling in C#.NET? 1 If an exception occurs then the program terminates abruptly without getting any chance to recover from the exception. 2 No matter whether an exception occurs or not, the statements in the finally clause (if present) will get executed. 3 A program can contain multiple finally clauses. 4 A finally clause is written outside the try block. 5 Finally clause is used to perform cleanup operations like closing the network/database connections. |
A. | 1 only |
B. | 2 only |
C. | 2 and 5 only |
D. | 3 and 4 only |
Answer» D. 3 and 4 only | |
28. |
Constructors are used to |
A. | initialize the objects |
B. | construct the data members |
C. | both a & b |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
29. |
LINQ to SQL works with |
A. | SQL Server |
B. | SQL Server Compact 3.5 |
C. | Both (a) and (b) |
D. | None of the above |
Answer» D. None of the above | |
30. |
Choose the correct statements about the LINQ? |
A. | The main concept behind the linq is query |
B. | linq make use of for loop to execute the query |
C. | It is not required that linq should make use of IEnumerable interface |
D. | None of the mentioned |
Answer» B. linq make use of for loop to execute the query | |
31. |
ADO.NET is the data access component of Microsoft’s .NET framework that enables you to |
A. | connect your Visual Basic.NET applications to your company’s local area network. |
B. | connect your Visual Basic.NET applications to databases. |
C. | connect your PC to the Internet. |
D. | connect your local area network to the Internet. |
Answer» C. connect your PC to the Internet. | |
32. |
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» E. | |
33. |
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» B. Redefining a method parameter in the method’s body causes an exception | |
34. |
Which of the following statements are correct about the Stack collection? 1. It can be used for evaluation of expressions. 2. All elements in the Stack collection can be accessed using an enumerator. 3. It is used to maintain a FIFO list. 4. All elements stored in a Stack collection must be of similar type. 5. Top-most element of the Stack collection can be accessed using the Peek() method. |
A. | 1 and 2 only |
B. | 3 and 4 only |
C. | 1, 2 and 5 only |
D. | All of the above |
Answer» D. All of the above | |
35. |
Which of the following are NOT true about .NET Framework? 1. It provides a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. 2. It provides a code-execution environment that minimizes software deployment and versioning conflicts. 3. It provides a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party. 4. It provides different programming models for Windows-based applications and Web-based applications. 5. It provides an event driven programming model for building Windows Device Drivers. |
A. | 1,2 |
B. | 2,4 |
C. | 4,5 |
D. | 1,2,4 |
Answer» D. 1,2,4 | |
36. |
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» E. | |
37. |
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» B. IEnumerable e; e = q.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current); | |
38. |
Which among the given classes present in System.Collection.Generic.namespace? |
A. | Stack |
B. | Tree |
C. | Sorted Array |
D. | All of the mentioned |
Answer» B. Tree | |
39. |
Number of constructors a class can define of ? |
A. | 1 |
B. | 2 |
C. | Any number |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
40. |
Which of the following can be facilitated by the Inheritance mechanism? 1 Use the existing functionality of base class. 2 Overrride the existing functionality of base class. 3 Implement new functionality in the derived class. 4 Implement polymorphic behaviour. 5 Implement containership. |
A. | 1, 2, 3 |
B. | 3, 4 |
C. | 2, 4, 5 |
D. | 3, 5 |
Answer» B. 3, 4 | |
41. |
A unique field which distinguishs a record is known as a |
A. | Foreign key. |
B. | Primary key. |
C. | Tertiary key. |
D. | Secondary key. |
Answer» E. | |
42. |
Which of the following define the rules for .Net Languages? |
A. | GAC |
B. | CLS |
C. | CTS |
D. | CLR |
Answer» C. CTS | |
43. |
______ parameters are used to pass results back to the calling method. |
A. | Input |
B. | Reference |
C. | Value |
D. | Output |
Answer» E. | |
44. |
Arrays in C# are ______ objects |
A. | Reference |
B. | Logical |
C. | Value |
D. | Arithmetic |
Answer» B. Logical | |
45. |
Which of the following namespace contains the LINQ to XML? |
A. | System.Xml; |
B. | System.Data; |
C. | System.Xml.Linq; |
D. | System.Linq; |
Answer» D. System.Linq; | |
46. |
When an instance method declaration includes the abstract modifier, the method is said tobe an ______. |
A. | Abstract method |
B. | Instance method |
C. | Sealed method |
D. | Expression method |
Answer» B. Instance method | |
47. |
Which of the following statements are TRUE about the .NET CLR? 1. It provides a language-neutral development & execution environment. 2. It ensures that an application would not be able to access memory that it is not authorized to access. 3. It provides services to run "managed" applications. 4. The resources are garbage collected. 5. It provides services to run "unmanaged" applications. |
A. | Only 1 and 2 |
B. | Only 1,2 and 4 |
C. | 1,2,3,4 |
D. | Only 4 and 5 |
Answer» D. Only 4 and 5 | |
48. |
C# treats the multiple catch statements like cases in a _____________ statement. |
A. | If |
B. | Switch |
C. | For |
D. | While |
Answer» C. For | |
49. |
C# has _______ operator, useful for making two way decisions. |
A. | Looping |
B. | Functional |
C. | Exponential |
D. | Conditional |
Answer» E. | |
50. |
C# supports a technique known as________, which allows a method to specify explicitlythe name of the interface it is implementing. |
A. | Method Implementation |
B. | Implicit Interface Implementation |
C. | Explicit Interface Implementation |
D. | Iterative Interface Implementation |
Answer» D. Iterative Interface Implementation | |