
- 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# Control Statements
- C# - Loops
- C# - For Loop
- C# - While Loop
- C# - Do While Loop
- C# - Nested Loops
- C# - Break
- C# - Continue
- 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# - 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# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
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 - We can use reserved keywords as identifiers in C# by prefixing them with @ character?
Answer : A
Explanation
if you want to use these keywords as identifiers, you may prefix the keyword with the @ character.
Q 2 - Which of the following is correct about reference type variables in C#?
A - The reference types do not contain the actual data stored in a variable.
B - They contain a reference to the variables.
C - Example of built-in reference types are: object, dynamic, and string.
Answer : D
Explanation
All of the above options are correct.
Q 3 - Which of the following converts a type to a 32-bit integer in C#?
Answer : D
Explanation
ToInt32() method converts a type to a 32-bit integer.
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 statements is correct about access specifiers in C#?
A - Encapsulation is implemented by using access specifiers.
B - An access specifier defines the scope and visibility of a class member.
Answer : C
Explanation
Both of the above statements are correct.
Q 6 - Which of the following property of Array class in C# checks whether the Array has a fixed size?
Answer : A
Explanation
IsFixedSize gets a value indicating whether the Array has a fixed size.
Q 7 - Which of the following is the correct about class constructor?
B - A constructor has exactly the same name as that of class and it does not have any return type.
Answer : C
Explanation
Both 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 allows you to undefine a symbol in C#?
Answer : B
Explanation
#undef: It allows you to undefine a symbol.
Q 10 - Which of the following preprocessor directive lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor in C#?
Answer : B
Explanation
#region − It lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor.