Programming MCQs

Solved Objective Questions on C# set-1

Pinterest LinkedIn Tumblr
Here is the collection of solved objective questions on C# includes multiple-choice questions on the fundamentals of C# programming language. It includes solved objective questions on the component of the .Net framework, C# IDE, the variable declaration on C#, and access specifiers supported by C#.

1. Which of the following is not the component of the .Net framework?
A) Common Language Run time(CLR)
B) .Net Framework Library.
C) Component Network
D) Windows Workflow Foundation (WF)

2. Following is/are the Integrated Development Environment (IDE) for C#.
A) Visual Studio 2010 (VS)
B) Visual Web Developer
C) Both A and BD) Only A

3. A C# program may consist of the following parts.
i) Namespace declaration
ii) Class methods
iii) The main method
iv) Statement & Expressions
A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv

4. State True or False for naming class in C#.
i) The class name can be a C# keyword.
ii) A name must begin with a letter, can be followed by letters, digits and underscore.
A) i- True, ii- False
B) i- False, ii- True
C) i-True, ii-True
D) i- False, ii- False

5. …………………. is a name which can be used to identify a class, variable, function etc.
A) Keyword
B) Reference
C) Identifier
D) Object

Read Also: MCQ Questions on C# with Answer

6. ……………….. conversions are performed by C# compiler itself and ………………… conversions are performed by users by using predefined functions.
A) Implicit type, Explicit type
B) Explicit type, Implicit type
C) External type, Internal type
D) Internal type, External type

7. A variable can be declared by using which of the following syntax?
A) <variable_list> <data_type>;
B) <variable_list>, <data_type>
C) <data_type> <variable_list>
D) <data_type> <variable_list>;

8. Match the following.
i) *                  a) returns the address of an variable
ii) ? :                b) point to variable
iii) &                c) conditional expression
A) i-a, ii-b, iii-c
B) i-b, ii-c, iii-a
C) i-c, ii-a, iii-b
D) i-a, ii-c, iii-b

9. C# supports the following types of access specifiers.
i) public ii) friend iii) private iv) protected v) internal
A) i, ii, iii and iv only
B) i, iii, iv and v only
C) i, ii, iv and v only
D) All i, ii, iii, iv and v

10. …………………… access specifier allows a class to expose it’s member variables and member functions to other functions and objects in the current application.
A) Internal
B) Protected
C) Private
D) Public

Answers:

1.  C) Component Network
2.  C) Both A and B
3.  D) All i, ii, iii  and iv
4.  B) i- False, ii- True
5.  C) Identifier
6.  A) Implicit type, Explicit type
7.  D) <data_type> <variable_list>;
8.  B) i-b, ii-c, iii-a
9.   B) i, iii, iv and v only
10. A) Internal

Read Next: Objective Questions of C# with Answer set-2

Author

Shuseel Baral is a web programmer and the founder of InfoTechSite has over 8 years of experience in software development, internet, SEO, blogging and marketing digital products and services is passionate about exceeding your expectations.

Comments are closed.