- 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 variable types can be assigned a value directly in C#?
Answer : A
Explanation
Value type variables can be assigned a value directly.
Q 2 - Which of the following converts a type to a single Unicode character, where possible in C#?
Answer : C
Explanation
ToChar() method converts a type to a single Unicode character, where possible.
Q 3 - Which of the following converts a floating point or integer type to a decimal type in C#?
Answer : A
Explanation
ToDecimal() method converts a floating point or integer type to a decimal type.
Q 4 - Which of the following operator creates a pointer to a variable in C#?
Answer : D
Explanation
* operator creates a pointer to a variable.
Q 5 - Which of the following access specifier in C# allows a child class to access the member variables and member functions of its base class?
Answer : C
Explanation
Protected access specifier allows a child class to access the member variables and member functions of its base class.
Q 6 - Which of the following is true about C# structures?
A - Structures can have methods, fields, indexers, properties, operator methods, and events.
B - Structures can have defined constructors, but not destructors.
Answer : D
Explanation
All of the above options are correct.
Q 7 - Which of the following is the correct about static member variables of a class?
A - We can define class members variables as static using the static keyword.
Answer : C
Explanation
Both of the above options are correct.
Answer : A
Explanation
Function overloading is a kind of static polymorphism.
Q 9 - Which of the following preprocessor directive allows generating an error from a specific location in your code in C#?
Answer : D
Explanation
#error − It allows generating an error from a specific location in your code.
Q 10 - Which of the following is true about catch block in C#?
B - The catch keyword indicates the catching of an exception.
Answer : C
Explanation
Both of the above options are correct.
To Continue Learning Please Login
Login with Google