- 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#?
A - C# is a modern, general-purpose, object-oriented programming language developed by Microsoft.
B - C# was developed by Anders Hejlsberg and his team during the development of .Net Framework.
C - C# is designed for Common Language Infrastructure (CLI).
Answer : D
Explanation
All of the above options are correct.
Q 2 - Which of the following converts a type to a Boolean value, where possible in C#?
Answer : A
Explanation
ToBoolean() method converts a type to a Boolean value, where possible.
Q 3 - Which of the following converts a type to a 16-bit integer in C#?
Answer : C
Explanation
ToInt16() method converts a type to a 16-bit integer.
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 method copies the reference to the memory location of an argument into the formal parameter?
Answer : B
Explanation
Reference parameters method copies the reference to the memory location of an argument into the formal parameter.
Q 6 - Which of the following is correct about nullable types in C#?
B - You can assign true, false, or null in a Nullable<bool> variable.
Answer : D
Explanation
All of the above statements are correct.
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
Opeator overloading is a kind of static polymorphism.
Q 9 - Which of the following preprocessor directive allows to create a compound conditional directive, along with #if in C#?
Answer : D
Explanation
#else − It allows to create a compound conditional directive, along with #if.
Q 10 - Which of the following preprocessor directive allows generating a level one warning from a specific location in your code in C#?
Answer : A
Explanation
#warning − It allows generating a level one warning from a specific location in your code.
To Continue Learning Please Login
Login with Google