- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Arithmetic Operators
- C# - Assignment Operators
- C# - Relational Operators
- C# - Logical Operators
- C# - Bitwise Operators
- C# - Miscellaneous Operators
- C# - Operators Precedence
- C# Conditional Statements
- C# - Decision Making
- C# - If
- C# - If Else
- C# - Nested If
- C# - Switch
- C# - Nested Switch
- C# - Switch Expressions
- C# Control Statements
- C# - Loops
- C# - For Loop
- C# - While Loop
- C# - Do While Loop
- C# - Nested Loops
- C# - Break
- C# - Continue
- C# - Foreach Loop
- C# - Goto Statement
- C# OOP & Data Handling
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Custom Exceptions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - LINQ
- C# - IEnumerable vs IEnumerator
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Tasks and Parallel Programming
- C# - Multithreading
- C# - Extension Methods
- C# - Lambda Expressions
- C# - Async and Await
- C# Modern Features
- C# - Tuples
- C# - Records
- C# - Pattern Matching Enhancements
- C# - Top-level Statements
- C# - Nullable Reference Types
- C# - What's New in C# 11 / 12 / 13
- C# - Global Usings
- C# - File-Scoped Namespaces
- C# Practical & Advanced Usage
- C# - JSON & XML Handling
- C# - Data Serialization & Deserialization
- C# - REST API Calls with Httpclient
- C# - Dependency Injection
- C# - Unit Testing with NUnit, xUnit & MSTest
- C# - Package Management with NuGet
C# Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to C#. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is a reserved keyword in C#?
Answer : D
Explanation
All of the above options are reserved keywords.
Q 2 - Which of the following converts a type to a Boolean value, where possible in C#?
Answer : A
Explanation
ToBoolean() method converts a type to a Boolean value, where possible.
Q 3 - Which of the following converts a type to a small floating point number in C#?
Answer : C
Explanation
ToSingle() method converts a type to a small floating point number.
Q 4 - Which of the following operator returns the size of a data type in C#?
Answer : A
Explanation
sizeof() operator returns the size of a data type.
Q 5 - Which of the following access specifier in C# allows a class to expose its member variables and member functions to other functions and objects?
Answer : A
Explanation
Public access specifier allows a class to expose its member variables and member functions to other functions and objects.
Q 6 - Which of the following is true about C# structures?
A - Unlike classes, structures cannot inherit other structures or classes.
B - Structure members cannot be specified as abstract, virtual, or protected.
Answer : D
Explanation
All of the above options are correct.
Q 7 - Which of the following is true about C# enumeration?
A - An enumerated type is declared using the enum keyword.
B - C# enumerations are value data type.
C - Enumeration contains its own values and cannot inherit or cannot pass inheritance.
Answer : D
Explanation
All of the above options are correct.
Q 8 - Which of the following is the correct about interfaces in C#?
A - Interfaces are declared using the interface keyword.
Answer : C
Explanation
Both of the above options are correct.
Q 9 - Which of the following preprocessor directive specifies the end of a conditional directive in C#?
Answer : B
Explanation
#endif − Specifies the end of a conditional directive.
Q 10 - Which of the following is true about try block in C#?
A - A try block identifies a block of code for which particular exceptions is activated.
Answer : C
Explanation
Both of the above options are correct.