Following quiz provides Multiple Choice Questions (MCQs) related to C#.
You can check all the questions and given choice, and select one answer in your answersheet, once you have selected answer, you can click on "View Answer" to check if you are correct or not.
sizeof
typeof
&
Explanation:
& operator returns the address of an variable.
*
&
Explanation:
& operator returns the address of an variable.
0, 0, 0 4, 4, 4 8, 8, 8
Explanation: Since, with each value of of ‘i’ the value of ‘j’ is executed three times i.e
for i = 0, j = 0, 0, 0, i = 1, j = 2, 2, 2.
4, 4, 4 8, 8, 8 12, 12, 12
8, 8, 8 12, 12, 12 16, 16, 16
0, 0, 0 1, 1, 1 2, 2, 2
0, 0, 0 4, 4, 4 8, 8, 8
Explanation: Since, with each value of of ‘i’ the value of ‘j’ is executed three times i.e
for i = 0, j = 0, 0, 0, i = 1, j = 2, 2, 2.
Encapsulation is defined as the process of enclosing one or more items within a physical or logical package.
Encapsulation, in object oriented programming methodology, prevents access to implementation details.
Abstraction allows making relevant information visible and encapsulation enables a programmer to implement the desired level of abstraction.
All Of above
All Of above
nestedif statement
#endif statement
switch case statement
None of the above
switch case statement
1- True, 2 - False, 3-True
1- False, 2- True, 3-True
1-True, 2-True, 3-False
1- False, 2- False, 3-True
1-True, 2-True, 3-False
Each property consists of accessor as get and set
A property cannot be either read or write only
Properties can be used to store and retrieve values to and from the data members of a class
Properties are like actual methods which work like data members
Each property consists of accessor as get and set
StackOverflow
Division By Zero
Insufficient Memory
Incorrect Arithmetic Expression
Incorrect Arithmetic Expression
Occurs during Just-In-Time compilation.
Occurs at run-time.
Occurs during compilation.
Occurs during compilation.
Occurs at run-time.
Unmanaged Code
Managed Code
The Common Language Runtime (CLR) is an environment that manages code execution and provides application development services. Compilers such as VB.NET expose CLR features to allow developers to create applications. Code created in this environment is called managed code.
PIN Code
COM Code
Managed Code
The Common Language Runtime (CLR) is an environment that manages code execution and provides application development services. Compilers such as VB.NET expose CLR features to allow developers to create applications. Code created in this environment is called managed code.
copy()
concat()
Compare()
C# Compare() method is used to compare first string with second string lexicographically. It returns an integer value. If both strings are equal, it returns 0.
compareto()
Compare()
C# Compare() method is used to compare first string with second string lexicographically. It returns an integer value. If both strings are equal, it returns 0.
Role-based security and Authentication Security
Role-based security and Code access security
Code access security and Authentication Security
Cookie-based Authentication and PIN Security
Role-based security and Authentication Security
That's it, we are done with Multiple choice Interview questions for C#, we may add more questions later.
You may also like to read:
SQL Multiple Choice Questions and answers
Javascript Multiple Choice questions and answers
OOPS interview questions in C# (With Answers)