Dotnet Framework

What is the difference between a stack and queue?

1.

Queues process value types by a top-down hierarchy - first in, first out (FIFO). Stacks follow this principle and insert items from the lower end while deleting ones from the top - last in, first-out (LIFO).

2.

Queues process value types by a top-down hierarchy-last in, first-out (LIFO). Stacks follow this principle and insert items from the lower end while deleting ones from the top-first in, first-out (FIFO).

3.

Stacks process value types by a top-down hierarchy - last in, first-out (LIFO). Queues follow this principle and insert items from the lower end while deleting ones from the top - first in, first-out (FIFO)

4.

Stacks process value types by a top-down hierarchy-first in, first out (FIFO). Queues follow this principle and insert items from the lower end while deleting ones from the top-last in, first-out (LIFO).

Q 1 / 62

Dotnet Framework

Which group contains all official types of JIT compilations?

1.

Pre-JIT, Quick-JIT, Coll-JIT

2.

Before-JIT, Quick-JIT, Cool-JIT

3.

Pre-JIT, Quick-JIT, Normal-JIT

4.

Pre-JIT, Econo-JIT, Normal-JIT

Q 2 / 62

Dotnet Framework

What is Kestrel?

1.

an iOS web server initially that was later designed to work with .NET Core

2.

a cross-platform web server ASP.NET Core that is included by default in ASP.NET Core project templates** <= Correct

3.

a cross-platform, open-source web server that starts up web APIs

4.

a free and open-source cross-platform web server software that can communicate with IIS

Q 3 / 62

Dotnet Framework

When would you use asynchronous actions?

1.

to release the quest thread of a I/O operation

2.

to capture the request thread of a I/O operation

3.

to avoid blocking the request thread while waits for an I/O operation

4.

to block the request thread if it waits for an I/O operation

Q 4 / 62

Dotnet Framework

What is CoreCLR?

1.

CoreCLR is a component that allows the highest degree of control when coding; you can Abort(), Suspend() or Resume().

2.

CoreCLR is the .NET execution engine that runs the source code. Special programs called compilers must rewrite it into MSIL.

3.

CoreCLR is the .NET execution engine the runs the source code. Special programs called compilers must rewrite it into IL.

4.

CoreCLR is the .NET execution engine in .NET Core that performs functions like garbage collection and compilation to machine code.

Q 5 / 62

Dotnet Framework

When you define an abstract method, how do you use it in a derived class?

1.

Abstract methods cannot be used in derived classes.

2.

In your derived class, overload the method.

3.

In your derived class, override the method.

4.

In your derived class, declare the method as virtual.

Q 6 / 62

Dotnet Framework

Which code do you use if you want to trigger a garbage collection in .NET?

1.

Garbage.CleanUp();

2.

System.GC.Clear();

3.

System.GC.Collect();

4.

Garbage.Collect();

Q 7 / 62

Dotnet Framework

undefined

1.

Interpreter <= correct

2.

Command

3.

Bridge

4.

Decorator

Q 8 / 62

Dotnet Framework

What makes a strong-named assembly?

1.

an assembly with the version specified

2.

a signed assembly

3.

an assembly with culture information

4.

an assembly with the name marked as important

Q 9 / 62

Dotnet Framework

What happens when you concatenate two strings?

1.

You cannot concatenate strings in .NET.

2.

The second string object is modified so it contains the concatenated strings.

3.

A third string object is created containing the concatenated strings.

4.

The first string object is modified so it contains the concatenated strings.

Q 10 / 62

Dotnet Framework

What is a delegate?

1.

A delegate is an object or collection initializer that adds flexibility, readability and maintainability in C#.

2.

A delegate in .NET is similar to a function pointer in C or C++. Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate object.

3.

A delegate is a collection initializer that adds flexibility, readability and maintainability in .NET.

4.

A delegate is an extension method. Using a delegate allows the programmer to add flexibility, readability and maintainability in .NET.

Q 11 / 62

Dotnet Framework

Which is a set of features that extends the query capabilities of the .NET language syntax by adding sets of new standard query operators that allow data manipulation, regardless of the data source?

1.

XML

2.

C#

3.

LINQ

4.

XAML

Q 12 / 62

Dotnet Framework

What is the single responsibility principle?

1.

Software entities should be open for extension, but closed for modification.

2.

Entities must depend on abstractions, not on concrete implementations.

3.

Objects in a program should be repleaceble with instances of their subtypes without altering the correctness of that programm.

4.

A class should have only a single responsibility - that is, only changes to one part of the software's specification should be able to affect the specification of the class.

Q 13 / 62

Dotnet Framework

When should a developer use the .NET Standard class library project type?

1.

when you want to increase the .NET API surface area your library can access, and allow only .NET Core apps to be compatible with your library

2.

when you want to increase the number of apps that are compatible with your library, and decrease the .NET API surface area your library can access

3.

when you want to decrease speed but have more features

4.

when you want to increase compilation speed and have fewer features

Q 14 / 62

Dotnet Framework

What is the difference between a SDK (software development kit) and runtime in .NET Core?

1.

The SDK is the "virtual machine" that hosts and runs the application and abstracts all the interaction with the operating system; the runtime usually includes documentation and other help files.

2.

The runtime is the virtual machine that hosts and runs the application and abstracts all the interaction with the operating system; the SDK usually includes documentation and other help files.

3.

The runtime compiles code along with the CLR; the SDK usually includes documentation and other help files.

4.

The SDK compiles code along with the CLR; the runtime usually includes documentation and other help files.

Q 15 / 62

Dotnet Framework

What is the Common Type System (CTS)?

1.

the component of CLR in which .NET Framework provides support for several languages since it contains a type system that is common with all the languages

2.

the component of CLI in which .NET Framework provides support for several languages since it contains a type system that is common with all the languages

3.

the component of CLR that allows you to map the content of a file to the logical address of an application

4.

the component of CLR that enables you to run multiple versions of an application or component and CLR on the same computer at the same time

Q 16 / 62

Dotnet Framework

Assuming y is a value type, which is an example of boxing?

1.

y = (int)thisObject;

2.

int y = 3;

3.

y = (int)thisObject=;3;

4.

object thisObject = y;

Q 17 / 62

Dotnet Framework

What is an abstract class in .NET?

1.

An abstract class provides a partial implementation for functionality and some abstract or virtual members that must be implemented by the inheriting entities. It can declare fields too. <= Correct

2.

An abstract class allows developers to create new classes that reuse, extend, and modify the behavior defined in other classes.

3.

An abstract class is responsible for keeping track of what is actually executing and where each executing thread is.

4.

An abstract class declares a contract or behavior that implementing classes require. It may declare only properties, methods, and events with no access modifiers. All the declared members must be implemented.

Q 18 / 62

Dotnet Framework

What is the namespace for caching information in .NET?

1.

System.Data.Caching;

2.

All.System.Caching;

3.

System.Runtime.Caching;

4.

System.Compiler.Caching;

Q 19 / 62

Dotnet Framework

What is an interface in .NET?

1.

An interface provides a partial implementation for functionality and some abstract or virtual members that must be implemented by the inheriting entities. It can declare fields too.

2.

An interface is responsible for keeping track of what is actually executing and where each executing thread is.

3.

An interface allows developers to create new classes that reuse, extend, and modify the behavior defined in other classes.

4.

An interface declares a contract or behavior that implementing classes require. It may declare only properties, methods, and events with no access modifiers. All the declared members must be implemented.

Q 20 / 62

Dotnet Framework

What does CAS stand for and what does it do?

1.

CAS stands for Code Application Secrets and it enables users to restrict, on a very granular level, what hidden code can do according to a level of trust for an application.

2.

CAS stands for Code Access Secrets and it enables users to restrict, on a very granular level, what hidden code can do according to a level of trust.

3.

CAS stands for Cognitive Access Security and it enables users to restrict security logic manipulation.

4.

CAS stands for Code Access Security and it enables users to restrict, on a very granular level, what managed code can do according to a level of trust.

Q 21 / 62

Dotnet Framework

Which is NOT true about lambda statements?

1.

A statement lambda cannot return a value. <= Correct

2.

If a statement lambda has a return value, it has to use a return statement.

3.

A statement lambda requires using curly braces.

4.

A statement lambda can have more than one statement.

Q 22 / 62

Dotnet Framework

Which is NOT true about a read-only variable?

1.

At runtime, its value is evaluated.

2.

It can be either static or an instance member.

3.

It can be initialized at declaration only.

4.

It can be initialized in either the constructor or the declaration.

Q 23 / 62

Dotnet Framework

What is the difference between System.String and string?

1.

string is used for fied-size strings in C#, while System.String is used for all the strings.

2.

There is no such class as System.String.

3.

There is none—string is an alias for System. String.

4.

System.String is a VB.NET data type, while string is a C# type.

Q 24 / 62

Dotnet Framework

When break is used inside two nested for loops, does control come out of the inner for loop or the outer for loop?

1.

It breaks from only the outer loop.

2.

It breaks from all loops.

3.

It breaks from only the inner loop.

4.

It breaks from the outer loop after the second iteration.

Q 25 / 62

Dotnet Framework

You want to separate object construction from its representation. Which design pattern best fits this objective?

1.

Adapter

2.

Bridge

3.

Singleton

4.

Builder

Q 26 / 62

Dotnet Framework

You want to encapsulate a command request as an object. Which design pattern best fits this objective?

1.

Command

2.

Iterator

3.

Facade

4.

Observer

Q 27 / 62

Dotnet Framework

Why would Pre-JIT be used by the .NET Framework?

1.

to compile only the methods that are called at runtime and store those methods in cache after execution

2.

to compile complete source code into native code in a single compilation cycle during deployment of the application

3.

to compile only the methods that are called at runtime and then store them in cache for one minute

4.

to compile only the methods that are called at runtime and remove them from memory after execution

Q 28 / 62

Dotnet Framework

What do code contracts do?

1.

Code contracts are data structures that can operate on demand per requirements.

2.

Code contracts provide a way to specify preconditions, postconditions, and object invariants in your code.

3.

Code contracts contain definitions for a group of related functionalities that a class or a struct can implement.

4.

Code contracts contain data structures for a group of related functionalities that a class or a struct can implement.

Q 29 / 62

Dotnet Framework

You must connect an app to an online identity provider using OAuth. For authentication, the app uses WebAuthenticationBroker object. You need to make sure the app registers with the provider. Which action do you take?

> The requestUri parameter must be a HTTPS address and you call the AuthenticateAsync method to connect to the online identity provider and get an access token

1.

Construct an HTTP request URI and an HTTPS request URI.

2.

Invoke the GetCurrentApplicationCallbackUri method and construct an HTTPS request URI.

3.

Invoke the AuthenticateAsync and GetCurrentApplicationCallbackUri methods.

4.

Invoke the AuthenticateAsync method and construct an HTTPS request URI.

Q 30 / 62

Dotnet Framework

undefined

1.

Adapter

2.

Singleton

3.

Bridge

4.

Decorator

Q 31 / 62

Dotnet Framework

undefined

1.

Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.

2.

A class should have only a single responsibility—that is, only changes to one part of the software's specification should be able to affect the specification of the class.

3.

Software entities should be open for extension, but closed for modification.

4.

Entities must depend on abstractions, not on concrete implementations. <= Correct

Q 32 / 62

Dotnet Framework

undefined

1.

a group of generic collections—in a logical hierarchy by function—that enable you to access the core functionality you need in your applications

2.

a group of methods—in a logical hierarchy by class—that enable you to access the core functionality you need in .NET

3.

a group of assemblies—in a logical hierarchy by function—that enable you to access the core functionality you need in your applications

4.

a group of classes, structures, interfaces, enumerations, and delegates—organized in a logical hierarchy by function that enable you to access the core functionality you need in your applications

Q 33 / 62

Dotnet Framework

undefined

1.

select new { a.Country, a.Region }

2.

select a

3.

select a.Country, a.Region

4.

select { a.Country, a.Region }

Q 34 / 62

Dotnet Framework

undefined

1.

At compile time, the value is evaluated.

2.

Only at declaration can it be initialized.

3.

At runtime, its value is evaluated.

4.

It cannot be static.

Q 35 / 62

Dotnet Framework

undefined

1.

CLR performs various operations such as security checks, spell checks, assembly loading, and thread management. It provides a secure execution environment for the internet.

2.

CLR sets the rules developers must use for the components that are interlanguage compatible. CLR is reusable across all the .NET-compliant languages.

3.

CLR is a compiler that converts Intermediate Language to a native code.

4.

CLR performs various operations such as memory management, security checks, assembly loading, and thread management. It also provides a secure execution environment for applications.

Q 36 / 62

Dotnet Framework

undefined

1.

Formerly known as MSIL, CIL is a programming language that NET developers use. It represents the lowest possible level for a language that humans can still read.

2.

CIL is an object-oriented programming language that is a partially compiled code that .NET developers will then compile to native machine code.

3.

CIL is used to convert a value type to an object type.

4.

CIL is a compiled code library that Microsoft developed as an open specification. Developers use it for security, versioning, and deployment purposes.

Q 37 / 62

Dotnet Framework

**_** pattern works as a bridge between two incompatible interfaces? // wording in question is maybe changed?

1.

Adapter

2.

Bridge

3.

Singleton

4.

Builder

Q 38 / 62

Dotnet Framework

undefined

1.

You can deliver a faster startup time, especially in big applications where much code executes on startup.

2.

You have a slow processor.

3.

You have little memory and disk space

4.

The JIT compiler does not have to do a lot of disk I/O actions, which are quite expensive.

Q 39 / 62

Dotnet Framework

undefined

1.

It defines an execution environment for program code and manages the CLR

2.

It belongs to the IDisposable interface and is used to free resources, such as network connection and files.

3.

It is partially method-compiled code library for use in deployment, versioning, and security.

4.

It is used for encapsulation of collections tied to functions of a class and object.

Q 40 / 62

Dotnet Framework

undefined

1.

A single operation that does not return a value and that usually executes asynchronously

2.

the basic unit to which an operating system allocate processor time

3.

a series of related tasks or methods that together turn inputs into outputs

4.

a program that is running on your computer

Q 41 / 62

Dotnet Framework

undefined

1.

Decorator

2.

Bridge

3.

Singleton

4.

Facade

Q 42 / 62

Dotnet Framework

undefined

1.

var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19);

2.

var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 21);

3.

var primes = Tuple.Make(2, 3, 5, 7, 11, 13, 17, 20);

4.

var primes = Tuple.Make(2, 3, 5, 7, 11, 13, 17, 19);

Q 43 / 62

Dotnet Framework

undefined

{ string theName = Request.Forms["theName"]; return View(); } { string theName = Request.Forms["theName"]; return View(); } { string theName = Request.Form["theName"]; return View(); } { string theName = Request.Form["theName"]; return View(); }

1.

public IFormResult ReceivedDataByRequest()

2.

public IActionResult ReceivedDataByRequest()

3.

public IFormResult ReceivedDataByRequest()

4.

public IActionResult ReceivedDataByRequest()

Q 44 / 62

Dotnet Framework

undefined

1.

in any file within the namespace of the program

2.

in the view

3.

in configuration files

4.

in the database

Q 45 / 62

Dotnet Framework

undefined

1.

design patterns make the code more efficient with memory usage

2.

design patterns minimize the number of code lines when creating complex applications

3.

design patterns tend to be more secure and prevent code from being hacked

4.

design patterns help you solve issues related to sofware development using a proven solution, and make communication between developers more efficient

Q 46 / 62

Dotnet Framework

undefined

1.

the basic unit to which an operating system allocates processor time

2.

a program that is running on your compiler

3.

a single operation that does not return a value and that usually executes asynchronously

4.

a series of related methods that together turn inputs into outputs

Q 47 / 62

Dotnet Framework

undefined

1.

common language JIT

2.

.NET framework class library

3.

common language runtime

4.

side-by-side execution

Q 48 / 62

Dotnet Framework

undefined

1.

The `this` keyword lets a constructor call a different constructor in the same class.

2.

A constructor can use a base statement and a `this` statement if the base statement comes first.

3.

A constructor can use one `this` statement at most.

4.

If a constructor uses a `this` statement, its code is executed after the invoked constructor is executed.

Q 49 / 62

Dotnet Framework

undefined

1.

when you want to increase the .NET API surface area your library can access, and allow only .NET Core apps to be compatible with your library

2.

when you want to increase the number of apps that are compatible with your library, and decrease the .NET API surface area your library can access

3.

when you want to decrease speed but have more features

4.

when you want to increase compilation speed and have fewer features

Q 50 / 62

Dotnet Framework

undefined

1.

to compile complete source code into native code in a single compilation cycle during deployment of the application

2.

to compile only the methods that are called at runtime and remove them from memory after execution

3.

to compile only the methods that are called at runtime and them store them in cache for one minute

4.

to compile only methods called at runtime – which are compiled the first time the methods are called and then stored in a cache to be used for execution when the same methods are called again

Q 51 / 62

Dotnet Framework

undefined

1.

.NET is a general-purpose programming language. The language has expanded significantly over time, and now has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

2.

.NET is a virtual machine that enables a computer to run programs written in several languages and compile programs to bytecode.

3.

.NET is an interpreted, high-level, general-purpose programming language. Its language constructs an object-oriented approach aimed at helping programmers write clear, logical code for small and large-scale projects.

4.

.NET is a free, cross-platform, open-source developer platform for building many different types of applications with multiple languages, editors, and libraries for web, mobile, desktop, gaming, and IoT.

Q 52 / 62

Dotnet Framework

undefined

1.

host an ASP.NET Code app inside of the IIS worker process, called the out-of-process hosting model, or forward web requests to a backend ASP.NET Core app running the Kesrel server, called the in-process hosting model

2.

create IIS code the server needs in a file with the extension required, or run the IIS server in a mode compatible for ASP.NET Core

3.

package up your C# application and C# packages into .NET modules, or specify which of its packages should be visible to other .NET modules

4.

host an ASP.NET Code app inside of the IIS workes process, called the in-process hosting model, or forward web requests to a backend ASP.NET Core app running the Kestrel server, called the out-of-process hosting model

Q 53 / 62

Dotnet Framework

undefined

cs @{ Html.RenderAction("Add"); Html.RenderPartial("Add"); }

1.

RenderPartial will call an action method of the current controller and render a result inline. RenderAction will render the specified view inline without calling any action method.

2.

RenderAction will call an action method of the current model and render a result inline. RenderPartial will render the specified view inline without calling any action method.

3.

RenderAction will call an action method of the current controller and render a result inline. RenderPartial will render the specified view inline without calling any action method.

4.

RenderPartial will call an action method of the current model and render a result inline. RenderAction will render the specified view inline without calling any action method.

Q 54 / 62

Dotnet Framework

undefined

1.

Many client-specific interfaces are better than one general-purpose interface.

2.

Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.

3.

A class should have only a single responsibility — that is, only changes to one part of the software's specification should be able to affect the specification of the class.

4.

Software entities should be open for extension, but closed for modification.

Q 55 / 62

Dotnet Framework

undefined

1.

Session.Timeout()

2.

Session.Abandon()

3.

Session.KillAll()

4.

Session.Remove()

Q 56 / 62

Dotnet Framework

undefined

1.

Localization enables the .NET runtime to provide services to managed code so language compilers can emit metadata and references in your code. Globalization reverses this process.

2.

Globalization enables the .NET runtime to provide services to managed code so language compilers can emit metadata and references in your code. Localization reverses this process.

3.

Localization involves designing and developing a world-ready app that supports localized interfaces and regional data for users in multiple cultures. Globalization is the process of translating an application's resources into versions for each culture that the application will support.

4.

Globalization involves designing and developing a world-ready app that supports localized interfaces and regional data for users in multiple cultures. Localization is the process of translating an application's resources into versions for each culture that the application will support.

Q 57 / 62

Dotnet Framework

undefined

1.

C# Interpreted Language

2.

Common Intermediate Language

3.

Commonly Interpreted Language

4.

C# Intermediate Language

Q 58 / 62

Dotnet Framework

undefined

1.

Namespace contains code to form MSIL (Microsoft Intermediate Language). An assembly contains a set of unique names.

2.

Namespace is the logical naming decided at design time by the developer. Scope for a particular type is defined at run time using an assembly.

3.

A namespace has logical units that are physically grouped together. An assembly does not have any classification.

4.

A namespace has logical units that are physically grouped together for assemblies. Assembly classes are available in your program and will be logically grouped.

Q 59 / 62

Dotnet Framework

undefined

1.

A data structure that has a specific number and sequence of elements

2.

An object to store multiple variables of the same type in an array data structure

3.

A group of classes designed specifically for grouping together objects and performing tasks on them

4.

An array whose elements are jagged

Q 60 / 62

Dotnet Framework

undefined

1.

Intermediate Language

2.

Intelligent Language

3.

Intelligent Linq

4.

Interpreted Language

Q 61 / 62

Dotnet Framework

undefined

1.

Decorator

2.

Singleton

3.

Abstract Factory

4.

Bridge

Q 62 / 62