Search Placementyogi.com
 

C# .NET Framework - Fundamental Objective Questions and Answers

6

Which of the following statements is correct about Managed Code?

A.

Managed code is the code that is compiled by the JIT compilers.

B.

Managed code is the code where resources are Garbage Collected.

C.

Managed code is the code that is written to target the services of the CLR.

D.

Managed code is the code that runs on top of Windows.

E.

Managed code is the code that can run on top of Linux.

See Answer & Explanation Lets Discuss
Correct answer is : C
Explanation

Applications that run on top of CLR are known as managed code and all others are known as unmanaged code.

 
7

.NET Framework contains the components (Choose all that apply)

A.

Windows Applications

B.

Windows Services

C.

CLR

D.

Framework Class Library

See Answer & Explanation Lets Discuss
Correct answer is : C,D
Explanation

CRL is building block of .Net Framework and it is used to compile intermediate language(IL) to platform-specific code. 

Framework class libraries or base class libraries define the types which supports the database access, security, XML manipulation and web form creations. This also comes with .Net Framework.

 
8

Which of the following jobs are performed by Garbage Collector? (Choose all that apply)

A.

Managing memory leaks

B.

Releasing memory on the stack

C.

Managing database collections

D.

Closing unclosed files

E.

Releasing memory taken by unreferenced objects

See Answer & Explanation Lets Discuss
Correct answer is : A,E
Explanation

Memory leak: A memory leak occurs when a program dynamically allocates memory that does't get properly deallocated after it's use.

Unreferenced objects: The objects which were created during execution of some classes but currently not in use.

Garbage collector takes care of these both situations internally so no need to worry about them externally.

 
9

The job of JIT or jitter is to (Choose all that apply)

A.

Compile CIL into machine-specific-code.

B.

Cache the compiled results in memory for later use.

C.

Compile code into CIL.

D.

All of the above.

E.

None of the above.

See Answer & Explanation Lets Discuss
Correct answer is : A,B
Explanation

The entity that compiles CIL (Common Intermediate Language) code into CPU instructions is called as just-in-time (JIT) compiler or Jitter.

When CIL instructions are compiled into plateform-specific instructions on the first invocation, they retain in memory for later use to improve the execution speed.

 
 

Banner to LogicGuns.com

Hide Page Information

C# .NET Framework - Fundamental Objective Questions and Answers with Explanation