.NET Framework and C# Fundamentals

Test your knowledge of .NET Framework components, C# programming concepts, object-oriented principles, and core programming fundamentals.

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following is the primary unit of .NET application?

  1. CTS
  2. CLR
  3. Assembly
  4. MSIL
Question 2 Multiple Choice (Single Answer)

Which of the following is the component of .NET Framework which makes it a Type-safe environment?

  1. CLR
  2. CTS
  3. MSIL
  4. Assembly Manifest
Question 3 Multiple Choice (Single Answer)

Once compiled, the executed and stored code in .NET is called _______.

  1. assembly code
  2. native code
  3. outside code
  4. immigrated code
Question 4 Multiple Choice (Single Answer)

A code written like: int a,b,c; a = (b+c); in any language gets converted to which language in .NET?

  1. Native Language
  2. Machine Language
  3. Assembly Language
  4. MSIL
Question 5 Multiple Choice (Single Answer)

Which namespace helps you to create the standard Windows applications?

  1. System.Threading;
  2. System.Windows.Forms;
  3. System.Windows;
  4. System.Forms;
Question 6 Multiple Choice (Single Answer)

Which of the following namespaces is the root of the .NET framework?

  1. Collections
  2. Drawing
  3. System
  4. Math
Question 7 Multiple Choice (Single Answer)

What is the class in System.Console.WriteLine()?

  1. System
  2. Console
  3. WriteLine
  4. None of the above
Question 8 Multiple Choice (Single Answer)

Which of the following are two(if exist) main types that are used in .NET Framework?

  1. Value Type and Reference Type
  2. Value Type and Non Value Type
  3. Reference Type and Non Value Type
  4. None of the above
Question 9 Multiple Choice (Single Answer)

Which of the following are the two main components of .NET Framework?

  1. CLR and Class Library
  2. CTS and CLR
  3. MSIL and CLR
  4. Class Library and CTS
Question 10 Multiple Choice (Single Answer)

What is the predefined or default type to which all the variables or any other component of .NET based program adhere to?

  1. System
  2. Object
  3. Class
  4. System.Object
Question 11 Multiple Choice (Single Answer)

With which component of a program is Literal associated?

  1. Variables
  2. Values of the Variables
  3. Methods of the Variables
  4. None of the above
Question 12 Multiple Choice (Single Answer)

The operator (=) in a = b is called

  1. Assignment operator.
  2. Conditional operator.
  3. Relational operator.
  4. Bitwise operator.
Question 13 Multiple Choice (Single Answer)

Why is the method ReadLine() used for in the System. Console.ReadLine()?

  1. For getting the input
  2. For printing the output
  3. For accessing any particular variable
  4. None of the above
Question 14 Multiple Choice (Single Answer)

Which of the following is not the type of operator used in C#?

  1. Assignment operator
  2. Conditional operator
  3. Relational operator
  4. Bitwise operator
  5. All of the above
Question 15 Multiple Choice (Single Answer)

Which of the following is the decision making statements in C#?

  1. Case statement
  2. If statement
  3. Else statement
  4. If Else statement
Question 16 Multiple Choice (Single Answer)

What would be the most suitable option to write a program (using conditional constructs) to write the names of months in the year?

  1. If else statement
  2. Switch case statement
  3. Both 1 and 2
  4. None of the above
Question 17 Multiple Choice (Single Answer)

Which of the following could be the possible reason to seal a class/method?

  1. To stop overriding
  2. To stop its implementation
  3. To stop inheritance
  4. None of these
Question 18 Multiple Choice (Single Answer)

Which of the following is not the type of access specifier in C#?

  1. Public
  2. Private
  3. Static
  4. Protected
Question 19 Multiple Choice (Single Answer)

Can we create the objects of abstract class?

  1. Yes
  2. No
Question 20 Multiple Choice (Single Answer)

Can we do the following assignment?num[0] = num2[1]; where both the arrays are integer type?

  1. Yes
  2. No
  3. Yes but some sort of type casting is required
  4. Impossible
Question 21 Multiple Choice (Single Answer)

The language uses opcodes instead of binary machine codes is called

  1. high level language
  2. machine language
  3. assembly language
  4. None of these
Question 22 Multiple Choice (Single Answer)

Which is the first method to be executed in a program?

  1. Its very first method
  2. Its very last method
  3. Its middle method
  4. None of the above
Question 23 Multiple Choice (Single Answer)

COBOL Stands for

  1. Computer business oriented language
  2. Coded business operator language
  3. Computer business operator language
  4. Common business oriented language
Question 24 Multiple Choice (Single Answer)

What is the following structure called?
int [] number = new int[5];

  1. Structure.
  2. Class.
  3. Enumeration.
  4. Array.
Question 25 Multiple Choice (Single Answer)

Is the following code right with respect to the concept of Interfaces? What's wrong with the code if use it as it is?

public Interface ISum

{
public void Sum()
{
int a,b,result; /*Assuming that we have the user's values for a and b.*/
result = (a+b); } }
  1. We can't declare Interface like this
  2. We can't give body to Interface like this
  3. We can't give body to things like methods in the Interface like this
  4. None of the above