MCQOPTIONS
Saved Bookmarks
This section includes 39 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
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 | |
| 2. |
Which of the following are valid .NET CLR JIT performance counters?1. Total memory used for JIT compilation2. Average memory used for JIT compilation3. Number of methods that failed to compile with the standard JIT4. Percentage of processor time spent performing JIT compilation5. Percentage of memory currently dedicated for JIT compilation |
| A. | 1,5 |
| B. | 3,4 |
| C. | 1,2 |
| D. | 4,5 |
| Answer» C. 1,2 | |
| 3. |
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 | |
| 4. |
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. | |
| 5. |
Which of the following benefits do we get on running managed code under CLR?1. Type safety of the code running under CLR is assured.2. It is ensured that an application would not access the memory that it is not authorized to access.3. It launches separate process for every application running under it.4. The resources are Garbage collected. |
| A. | Only 1 and 2 |
| B. | Only 2, 3 and 4 |
| C. | Only 1, 3 and 4 |
| D. | All of the above |
| Answer» E. | |
| 6. |
Which of the following constitutes the .NET Framework? 1. ASP.NET Applications 2. CLR 3. Framework Class Library 4. WinForm Applications 5. Windows Services |
| A. | 1,2 |
| B. | 2,3 |
| C. | 3,4 |
| D. | 2,5 |
| Answer» C. 3,4 | |
| 7. |
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. | |
| 8. |
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» E. | |
| 9. |
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» C. Application Forms | |
| 10. |
Which of the following should be used to implement a 'Has a' relationship between two entities? |
| A. | Polymorphism |
| B. | Templates |
| C. | Containership |
| D. | Encapsulation |
| Answer» D. Encapsulation | |
| 11. |
Which of the following statements is correct about the C#.NET code snippet given below?class Student s1, s2; // Here 'Student' is a user-definedclass. s1 = new Student();s2 = new Student(); |
| A. | Contents of s1 and s2 will be exactly same. |
| B. | The two objects will get created on the stack. |
| C. | Contents of the two objects created will be exactly same. |
| D. | The two objects will always be created in adjacent memory locations. |
| Answer» D. The two objects will always be created in adjacent memory locations. | |
| 12. |
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 | |
| 13. |
Which of the following should be used to implement a 'Like a' or a 'Kind of' relationship between two entities? |
| A. | Polymorphism |
| B. | Containership |
| C. | Templates |
| D. | Inheritance |
| Answer» E. | |
| 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. |
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 | |
| 16. |
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» E. | |
| 17. |
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» B. Instance method | |
| 18. |
Which of the following statements are correct about the delegate declaration given below? delegate void del(int I);1. On declaring the delegate a class called del will get created.2. The signature of del need not be same as the signature of the method that we intend to call using it.3. The del class will be derived from the MulticastDelegate class.4. The method that can be called using del should not be a static method.5. The del class will contain a one-argument constructor and an lnvoke() method. |
| A. | 1, 2 and 3 only |
| B. | 1, 3 and 5 only |
| C. | 2 and 4 only |
| D. | 4 only |
| Answer» C. 2 and 4 only | |
| 19. |
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» C. Information Hiding | |
| 20. |
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» D. Iterative Interface Implementation | |
| 21. |
A computer application that manages a database, in which different kinds of data are stored in separate tables, is known as a |
| A. | Normal database system. |
| B. | Network database system. |
| C. | Standalone database system. |
| D. | Relational database management system. |
| Answer» E. | |
| 22. |
Which of the following statements are correct?1. We can assign values of any type to variables of type object.2. When a variable of a value type is converted to object, it is said to be unboxed.3. When a variable of type object is converted to a value type, it is said to be boxed.4. Boolean variable cannot have a value of null.5. When a value type is boxed, an entirely new object must be allocated and constructed. |
| A. | 2,5 |
| B. | 1,5 |
| C. | 3,4 |
| D. | 2,3 |
| Answer» C. 3,4 | |
| 23. |
Which of the following statements are correct about data types?1. If the integer literal exceeds the range of byte, a compilation error will occur.2. We cannot implicitly convert non-literal numeric types of larger storage size to byte.3. Byte cannot be implicitly converted to float.4. A char can be implicitly converted to only int data type. 5. We can cast the integral character codes. |
| A. | 1,3,5 |
| B. | 2,4 |
| C. | 3,5 |
| D. | 1,2,5 |
| Answer» E. | |
| 24. |
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 | |
| 25. |
________causes the loop to continue with the next iteration after skipping any statements in between. |
| A. | Loop |
| B. | Exit |
| C. | Break |
| D. | Continue |
| Answer» E. | |
| 26. |
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 | |
| 27. |
Which of the following statements are correct about arrays used in C#.NET?1. Arrays can be rectangular or jagged.2. Rectangular arrays have similar rows stored in adjacent memory locations.3. Jagged arrays do not have an access to the methods of System.Array Class.4. Rectangular arrays do not have an access to the methods of System.Array Class.5. Jagged arrays have dissimilar rows stored in non-adjacent memory locations. |
| A. | 1,2 |
| B. | 1,3,5 |
| C. | 3,4 |
| D. | 1,2,5 |
| Answer» E. | |
| 28. |
Which of the following will be the correct output for the C#.NET code snippet given below?String s1 = "ALL MEN ARE CREATED EQUAL";String s2; s2 = s1.Substring(12, 3);Console.WriteLine(s2); |
| A. | ARE |
| B. | CRE |
| C. | CR |
| D. | REA |
| Answer» C. CR | |
| 29. |
What will be the output of the following code snippet when it is executed?int x = 1;float y = 1.1f;short z = 1;Console.Write.Line((float) x + y * z - (x += (short) y)); |
| A. | 0.1 |
| B. | 1.0 |
| C. | 1.1 |
| D. | 11 |
| Answer» B. 1.0 | |
| 30. |
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 | |
| 31. |
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» B. Method Overriding | |
| 32. |
Which of the following can be used to terminate a while loop and transfer control outside the loop?1. exit while2. continue3. exit statement4. break5. goto |
| A. | 1,3 |
| B. | 2,4 |
| C. | 3,5 |
| D. | 4,5 |
| Answer» E. | |
| 33. |
Which of the following statements are correct about JIT?1. JIT compiler compiles instructions into machine code at run time.2. The code compiler by the JIT compiler runs under CLR.3. The instructions compiled by JIT compilers are written in native code.4. The instructions compiled by JIT compilers are written in Intermediate Language (IL) code. |
| A. | 1,2,3 |
| B. | 2,4 |
| C. | 3,4 |
| D. | 1,2 |
| Answer» B. 2,4 | |
| 34. |
Which of the following is the correct way to create an object of the class Sample? 1. Sample s = new Sample(); 2. Sample s; 3. Sample s; s = new Sample(); 4. s = new Sample(); |
| A. | 1,3 |
| B. | 2,4 |
| C. | 1,2,3 |
| D. | 4,5 |
| Answer» B. 2,4 | |
| 35. |
Which of the following statements are correct?1. Instance members of a class can be accessed only through an object of that class.2. A class can contain only instance data and instance member function.3. All objects created from a class will occupy equal number of bytes in memory.4. A class can contain Friend functions.5. A class is a blueprint or a template according to which objects are created. |
| A. | 1,3,5 |
| B. | 2,4 |
| C. | 3,5 |
| D. | 2,4,5 |
| Answer» B. 2,4 | |
| 36. |
Which of the following statements are correct about the C#.NETcode snippet given below?if (age > 18 && no < 11) a = 25;1. The condition no < 11 will be evaluated only if age > 18 evaluates to True.2. The statement a = 25 will get executed if any one condition is True.3. The condition no < 11 will be evaluated only if age > 18 evaluates to False.4. The statement a = 25 will get executed if both the conditions are True.5. && is known as a short circuiting logical operator. |
| A. | 1,3 |
| B. | 2,5 |
| C. | 1,4,5, |
| D. | 3,4,5 |
| Answer» D. 3,4,5 | |
| 37. |
Which of the following statements are correct about JIT?1. JIT compiler compiles instructions into machine code at run time.2. The code compiler by the JIT compiler runs under CLR.3. The instructions compiled by JIT compilers are written in native code.4. The instructions compiled by JIT compilers are written in Intermediate Language (IL) code.5. The method is JIT compiled even if it is not called |
| A. | 1, 2, 3 |
| B. | 2,4 |
| C. | 3,4,5 |
| D. | 1,2 |
| Answer» B. 2,4 | |
| 38. |
Which of the following are parts of the .NET Framework?1. The Common Language Runtime (CLR)2. The Framework Class Libraries (FCL)3. Microsoft Published Web Services4. Applications deployed on IIS5. Mobile Applications |
| A. | Only 1, 2, 3 |
| B. | Only 1, 2 |
| C. | Only 1, 2, 4 |
| D. | Only 4,5 |
| Answer» C. Only 1, 2, 4 | |
| 39. |
An _______ is a symbol that tells the computer to perform certain mathematical or logical manipulations. |
| A. | Operator |
| B. | Expression |
| C. | Condition |
| D. | Logic |
| Answer» B. Expression | |