- 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 a contextual keyword in C#?
Answer : D
Explanation
All of the above options are contextual keywords.
Q 2 - Which of the following defines boxing correctly?
A - When a value type is converted to object type, it is called boxing.
B - When an object type is converted to a value type, it is called boxing.
Answer : A
Explanation
When a value type is converted to object type, it is called boxing.
Q 3 - Which of the following converts a type to a 64-bit integer in C#?
Answer : A
Explanation
ToInt64() method converts a type to a 64-bit integer.
Q 4 - Which of the following operator determines whether an object is of a certain type in C#?
Answer : B
Explanation
is operator determines whether an object is of a certain type.
Q 5 - Which of the following method copies the actual value of an argument into the formal parameter of the function?
Answer : A
Explanation
Value parameters method copies the actual value of an argument into the formal parameter of the function.
Q 6 - Which of the following property of Array class in C# checks whether the Array is readonly?
Answer : B
Explanation
IsReadOnly gets a value indicating whether the Array is readonly.
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.
Answer : B
Explanation
The conditional logical operators cannot be overloaded.
Q 9 - Which of the following is the correct about namespaces in C#?
A - A namespace is designed for providing a way to keep one set of names separate from another.
C - The using keyword states that the program is using the names in the given namespace.
Answer : D
Explanation
All of the above options are correct.
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.