Home / Programming MCQs / C# MCQs / Question

R

Ram Sharma • 188.81K Points
Coach

Q. What will be the output of the following C# code?

Code:
1
(A) 1
(B) 2
(C) 5
(D) Runtime Error

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Related MCQs on C#

An abstract class

For client-side custom validation, the name of the custom function must be identified in the ______________ function property

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.

Code that targets the Common Language Runtime is known as

The Garbage Collection solves_____________.

Which of the following statements correctly define .NET Framework?

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

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.

The code public class B : A { }

The ______ are the Graphical User Interface (GUI) components created for web based interactions.

Learn All C# MCQs