C# MCQ Questions And Answers
This section focuses on "basics" in C#. These Multiple Choice Questions (MCQs) should be practiced to improve the C# skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. C# is a?
A. general-purpose programming language
B. object-oriented programming language
C. modern programming language
D. All of the above
View Answer
Ans : D
Explanation: C# is a modern, general-purpose, object-oriented programming language
2. C# developed by?
A. IBM
B. Google
C. Microsoft
D. Facebook
View Answer
Ans : C
Explanation: C# developed by Microsoft and approved by European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO).
3. CLI in C# Stands for?
A. Common Language Infrastructure
B. Code Language Infrastructure
C. Computer Language Infrastructure
D. C# Language Infrastructure
View Answer
Ans : A
Explanation: C# is designed for Common Language Infrastructure (CLI), which consists of the executable code and runtime environment that allows use of various high-level languages on different computer platforms and architectures.
4. C# has strong resemblance with?
A. C
B. C++
C. Java
D. Python
View Answer
Ans : C
Explanation: It has strong resemblance with Java, it has numerous strong programming features that make it endearing to a number of programmers worldwide.
5. Which of the following not true about C#?
A. It is component oriented
B. It is a unstructured language
C. It is easy to learn
D. It is a part of .Net Framework.
View Answer
Ans : B
Explanation: C# is a structured language.
6. Choose .NET class name from which data type UInt is derived?
A. System.Int16
B. System.UInt32
C. System.UInt64
D. System.UInt16
View Answer
Ans : B
Explanation: By Definition class assigned to
i) System.Int16 = short.
ii) System.UInt32 = UInt.
iii) System.UInt64 = ULong.
iv) System.UInt16 = UShort.
7. The first line of the program is?
A. using System
B. namespace
C. using namespace
D. None of the above
View Answer
Ans : A
Explanation: The first line of the program using System; - the using keyword is used to include the System namespace in the program. A program generally has multiple using statements.
8. A namespace is a collection of classes.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: A namespace is a collection of classes. The HelloWorldApplication namespace contains the class HelloWorld.
9. In C#, Save the file using?
A. .c extension
B. .csharp extension
C. .net extension
D. .cs extension
View Answer
Ans : D
Explanation: Save the file as helloworld.cs
10. Number of digits upto which precision value of float data type is valid?
A. Upto 6 digit
B. Upto 7 digit
C. Upto 8 digit
D. Upto 9 digit
View Answer
Ans : B
Explanation: Number of digits upto which precision value of float data type is valid is upto 7 digit
Discussion