- 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 - 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 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 signed byte type in C#?
Answer : B
Explanation
ToSbyte() method converts a type to a signed byte type.
Q 4 - Which of the following converts a type to an unsigned long type in C#?
Answer : C
Explanation
ToUInt32() method converts a type to an unsigned long 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# gets a 32-bit integer, the total number of elements in all the dimensions of the Array?
Answer : C
Explanation
Length gets a 32-bit integer that represents the total number of elements in all the dimensions of the Array.
Q 7 - Which of the following is the default access specifier of a class member function?
Answer : A
Explanation
Default access for the class member function is Private.
Answer : A
Explanation
C# does not support multiple inheritance.
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 is true about exceptions in C#?
Answer : C
Explanation
Both of the above options are correct.
To Continue Learning Please Login
Login with Google