- 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).
- 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).
- 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)
- 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).
- Pre-JIT, Quick-JIT, Coll-JIT
- Before-JIT, Quick-JIT, Cool-JIT
- Pre-JIT, Quick-JIT, Normal-JIT
- Pre-JIT, Econo-JIT, Normal-JIT
- an iOS web server initially that was later designed to work with .NET Core
- a cross-platform web server ASP.NET Core that is included by default in ASP.NET Core project templates** <= Correct
- a cross-platform, open-source web server that starts up web APIs
- a free and open-source cross-platform web server software that can communicate with IIS
- to release the quest thread of a I/O operation
- to capture the request thread of a I/O operation
- to avoid blocking the request thread while waits for an I/O operation
- to block the request thread if it waits for an I/O operation
- CoreCLR is a component that allows the highest degree of control when coding; you can Abort(), Suspend() or Resume().
- CoreCLR is the .NET execution engine that runs the source code. Special programs called compilers must rewrite it into MSIL.
- CoreCLR is the .NET execution engine the runs the source code. Special programs called compilers must rewrite it into IL.
- CoreCLR is the .NET execution engine in .NET Core that performs functions like garbage collection and compilation to machine code.
- Abstract methods cannot be used in derived classes.
- In your derived class, overload the method.
- In your derived class, override the method.
- In your derived class, declare the method as virtual.
- Garbage.CleanUp();
- System.GC.Clear();
- System.GC.Collect();
- Garbage.Collect();
Q8.You want to include language elements in a program. Which design pattern best fits this objective?
- Interpreter
- Command
- Bridge
- Decorator
- an assembly with the version specified
- a signed assembly
- an assembly with culture information
- an assembly with the name marked as important
- You cannot concatenate strings in .NET.
- The second string object is modified so it contains the concatenated strings.
- A third string object is created containing the concatenated strings.
- The first string object is modified so it contains the concatenated strings.
- A delegate is an object or collection initializer that adds flexibility, readability and maintainability in C#.
- 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.
- A delegate is a collection initializer that adds flexibility, readability and maintainability in .NET.
- A delegate is an extension method. Using a delegate allows the programmer to add flexibility, readability and maintainability in .NET.
Q12.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?
- XML
- C#
- LINQ
- XAML
- Software entities should be open for extension, but closed for modification.
- Entities must depend on abstractions, not on concrete implementations.
- Objects in a program should be repleaceble with instances of their subtypes without altering the correctness of that programm.
- 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.
- 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
- 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
- when you want to decrease speed but have more features
- when you want to increase compilation speed and have fewer features
- 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.
- 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.
- The runtime compiles code along with the CLR; the SDK usually includes documentation and other help files.
- The SDK compiles code along with the CLR; the runtime usually includes documentation and other help files.
- 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
- 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
- the component of CLR that allows you to map the content of a file to the logical address of an application
- 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
- y = (int)thisObject;
- int y = 3;
- y = (int)thisObject=;3;
- object thisObject = y;
- 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.
- An abstract class allows developers to create new classes that reuse, extend, and modify the behavior defined in other classes.
- An abstract class is responsible for keeping track of what is actually executing and where each executing thread is.
- 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.
- System.Data.Caching;
- All.System.Caching;
- System.Runtime.Caching;
- System.Compiler.Caching;
- 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.
- An interface is responsible for keeping track of what is actually executing and where each executing thread is.
- An interface allows developers to create new classes that reuse, extend, and modify the behavior defined in other classes.
- 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.
- 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.
- 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.
- CAS stands for Cognitive Access Security and it enables users to restrict security logic manipulation.
- 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.
- A statement lambda cannot return a value. <= Correct
- If a statement lambda has a return value, it has to use a return statement.
- A statement lambda requires using curly braces.
- A statement lambda can have more than one statement.
- At runtime, its value is evaluated.
- It can be either static or an instance member.
- It can be initialized at declaration only.
- It can be initialized in either the constructor or the declaration.
- string is used for fied-size strings in C#, while System.String is used for all the strings.
- There is no such class as System.String.
- There is none—string is an alias for System. String.
- System.String is a VB.NET data type, while string is a C# type.
Q25. When break is used inside two nested for loops, does control come out of the inner for loop or the outer for loop?
- It breaks from only the outer loop.
- It breaks from all loops.
- It breaks from only the inner loop.
- It breaks from the outer loop after the second iteration.
Q26. You want to separate object construction from its representation. Which design pattern best fits this objective?
- Adapter
- Bridge
- Singleton
- Builder
Q27. You want to encapsulate a command request as an object. Which design pattern best fits this objective?
- Command
- Iterator
- Facade
- Observer
- to compile only the methods that are called at runtime and store those methods in cache after execution
- to compile complete source code into native code in a single compilation cycle during deployment of the application
- to compile only the methods that are called at runtime and then store them in cache for one minute
- to compile only the methods that are called at runtime and remove them from memory after execution
- Code contracts are data structures that can operate on demand per requirements.
- Code contracts provide a way to specify preconditions, postconditions, and object invariants in your code.
- Code contracts contain definitions for a group of related functionalities that a class or a struct can implement.
- Code contracts contain data structures for a group of related functionalities that a class or a struct can implement.
Q30. 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 actions do you take?
- Construct an HTTP request URI and an HTTPS request URI.
- Invoke the GetCurrentApplicationCallbackUri method and construct an HTTPS request URI.
- Invoke the AuthenticateAsync and GetCurrentApplicationCallbackUri methods.
- Invoke the AuthenticateAsync method and construct an HTTPS request URI. //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
Q31.You want to create a class of which only a single instance can exist. Which design pattern best fits this objective?
- Adapter
- Singleton
- Bridge
- Decorator
- Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
- 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.
- Software entities should be open for extension, but closed for modification.
- Entities must depend on abstractions, not on concrete implementations. <= Correct
- a group of generic collections—in a logical hierarchy by function—that enable you to access the core functionality you need in your applications
- a group of methods—in a logical hierarchy by class—that enable you to access the core functionality you need in .NET
- a group of assemblies—in a logical hierarchy by function—that enable you to access the core functionality you need in your applications
- 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
- select new { a.Country, a.Region }
- select a
- select a.Country, a.Region
- select { a.Country, a.Region }
- At compile time, the value is evaluated.
- Only at declaration can it be initialized.
- At runtime, its value is evaluated.
- It cannot be static.
- CLR performs various operations such as security checks, spell checks, assembly loading, and thread management. It provides a secure execution environment for the internet.
- CLR sets the rules developers must use for the components that are interlanguage compatible. CLR is reusable across all the .NET-compliant languages.
- CLR is a compiler that converts Intermediate Language to a native code.
- CLR performs various operations such as memory management, security checks, assembly loading, and thread management. It also provides a secure execution environment for applications.
- 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.
- CIL is an object-oriented programming language that is a partially compiled code that .NET developers will then compile to native machine code.
- CIL is used to convert a value type to an object type.
- CIL is a compiled code library that Microsoft developed as an open specification. Developers use it for security, versioning, and deployment purposes.
Q38. ___ pattern works as a bridge between two incompatible interfaces? // wording in question is maybe changed?
- Adapter
- Bridge
- Singleton
- Builder
- You can deliver a faster startup time, especially in big applications where much code executes on startup.
- You have a slow processor.
- You have little memory and disk space
- The JIT compiler does not have to do a lot of disk I/O actions, which are quite expensive.
- It defines an execution environment for program code and manages the CLR
- It belongs to the IDisposable interface and is used to free resources, such as network connection and files.
- It is partially method-compiled code library for use in deployment, versioning, and security.
- It is used for encapsulation of collections tied to functions of a class and object.
- A single operation that does not return a value and that usually executes asynchronously
- the basic unit to which an operating system allocate processor time
- a series of related tasks or methods that together turn inputs into outputs
- a program that is running on your computer
[reference link] https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task?view=net-5.0
Q43. You want to add responsibilities to object dynamically. Which design pattern best fit this objective?
- Decorator
- Bridge
- Singleton
- Facade
- var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19);
- var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 21);
- var primes = Tuple.Make(2, 3, 5, 7, 11, 13, 17, 20);
- var primes = Tuple.Make(2, 3, 5, 7, 11, 13, 17, 19);
- public IFormResult ReceivedDataByRequest() { string theName = Request.Forms["theName"]; return View(); }
- public IActionResult ReceivedDataByRequest() { string theName = Request.Forms["theName"]; return View(); }
- public IFormResult ReceivedDataByRequest() { string theName = Request.Form["theName"]; return View(); }
- public IActionResult ReceivedDataByRequest() { string theName = Request.Form["theName"]; return View(); }
- in any file within the namespace of the program
- in the view
- in configuration files
- in the database