Dot Net Test

Description: This test is the basic test of DOT NET and this can easily click the new minds.
Number of Questions: 25
Created by:
Tags: DOT NET .Net Technologies CLR MSIL Web Based Applications Window Based Applications Console Based Applications Interfaces Programming
Attempted 0/25 Correct 0 Score 0

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

  1. CTS

  2. CLR

  3. Assembly

  4. MSIL


Correct Option: C
Explanation:

The primary unit of .NET application is the assembly. An assembly is a self describing collection of code, resources and metadata.

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


Correct Option: B
Explanation:

CTS ensures type compatibility between various .NET components as CTS stands for Common Type Safety. For e.g. int x = TextBox1.text; // considering the scenario that we have some value in the textbox1 which is of text type and we are receiving the value in int type. So, CTS would not allow you this type of conversion in .NET and this could be done by:

int x = Convert.ToInt32(TextBox1.Text);  // As we have done the typecasting of text type to int type. So, CTS would allow us to get the text type value to the int type variable.

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

  1. assembly code

  2. native code

  3. outside code

  4. immigrated code


Correct Option: B
Explanation:

Except native code, all others options are not the technical terms, used in .NET.

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


Correct Option: D
Explanation:

MSIL stands for Microsoft Intermediate Language which is an intermediate language to which any code written in any language whether C++, C#, VB, VJ# all get converted to MSIL before getting converted to machine language.

Which namespace helps you to create the standard Windows applications?

  1. System.Threading;

  2. System.Windows.Forms;

  3. System.Windows;

  4. System.Forms;


Correct Option: B
Explanation:

System.Windows.Forms; namespace contains the types involved in creating the standard Windows application. The classes that represent the forms and controls reside here as well.

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

  1. Collections

  2. Drawing

  3. System

  4. Math


Correct Option: C
Explanation:

The root namespace of .NET framework is the system namespace, which contains the definitions of all the built in data types and sub namespaces.

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

  1. System

  2. Console

  3. WriteLine

  4. None of the above


Correct Option: B
Explanation:

The above written line contains the namespace System. Console, which is the class used to write on to the console and the WriteLine is the method to write the line on the screen.

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


Correct Option: A
Explanation:

The two types of .NET Framework are: Value types and Reference types. The primary difference between these two is with the way the variable data is accessed.

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


Correct Option: A
Explanation:

CLR is Common Language Runtime, which distinguishes .NET framework from other frameworks as this makes .NET framework language independent and Class Library provides the collection of useful and reusable types that are designed to integrate with CLR.

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


Correct Option: D
Explanation:

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

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


Correct Option: B
Explanation:

Explanation: Literals are the values assigned to the variables in a program.

The operator (=) in a = b is called

  1. Assignment operator.

  2. Conditional operator.

  3. Relational operator.

  4. Bitwise operator.


Correct Option: A
Explanation:

Explanation: Here, b's value is getting assigned to a.

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


Correct Option: A
Explanation:

Explanation: Console.ReadLine() is used to get the input from the user and Console. WriteLine() is used to print the output to the screen.

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


Correct Option: D
Explanation:

All of the above are the types of operators used in C#.

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

  1. Case statement

  2. If statement

  3. Else statement

  4. If Else statement


Correct Option: D
Explanation:

Explanation: It is used to control the flow of execution of statements. It is a two way decision statement.

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


Correct Option: B
Explanation:

Explanation:  Switch Case would be most appropriate because if we use if else then we will have to write 12 if else statements.

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


Correct Option: D
Explanation:

Explanation: We seal the class/method to stop its inheritance so that it could not be further inherited.

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

  1. Public

  2. Private

  3. Static

  4. Protected


Correct Option: C
Explanation:

It is  Static because this is a modifier which modifies/changes the present state.

Can we create the objects of abstract class?

  1. Yes

  2. No


Correct Option: B
Explanation:

Explanation: We can't create the object of an abstract class because these are the classes which get its implementation in the classes where these are used.

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


Correct Option: D
Explanation:

Explanation: We cannot equate these two types of arrays.

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


Correct Option: C

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


Correct Option: D
Explanation:

Explanation: The very first method the compiler looks for is the Main method in the program.

COBOL Stands for

  1. Computer business oriented language

  2. Coded business operator language

  3. Computer business operator language

  4. Common business oriented language


Correct Option: D

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

  1. Structure.

  2. Class.

  3. Enumeration.

  4. Array.


Correct Option: D
Explanation:

Explanation: An Array is the group of related items of same data type.

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


Correct Option: C
Explanation:

Explanation: Interfaces do not have implementation within them. Instead, they are used as such and are given body wherever they are implemented. So, all the working done in the Sum() must not be there for the time being it is in the Interface ISum.

- Hide questions