- C# Basic Tutorial
- 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# - Decision Making
- C# - Loops
- 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# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
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 correct about C#?
B - It can be compiled on a variety of computer platforms.
Answer : D
Explanation
All of the above options are correct.
Answer : A
Explanation
Value type variables in C# are derived from the class System.ValueType.
Q 3 - Which of the following converts a type to a string in C#?
Answer : D
Explanation
ToString() method converts a type to a string.
Q 4 - Which of the following operator returns the address of an variable in C#?
Answer : C
Explanation
& operator returns the address of an variable.
Q 5 - Which of the following statements is correct about encapsulation?
Answer : D
Explanation
All of the above statements are correct.
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 the correct about class destructor?
Answer : C
Explanation
Both of the above options are correct.
Answer : A
Explanation
The assignment operators cannot be overloaded.
Q 9 - Which of the following preprocessor directive allows creating a compound conditional directive in C#?
Answer : A
Explanation
#elif − It allows creating a compound conditional directive.
Q 10 - Which of the following preprocessor directive marks the end of a #region block in C#?
Answer : C
Explanation
#endregion − It marks the end of a #region block.