.NET Micro Framework/.NET MCQ Set 3 Sample Test,Sample questions

Question:
A manifest includes the following data about the assembly

1.File list

2.None Referenced assemblies

3.MSIL information

4.None of these


Question:
A standard Windows PE file is divided into a number of sections. Which of the following are not valid native image sections?

1.textdata

2.data

3.rpdata

4.rsrc


Question:
C# has a keyword called int. Which .NET type does this map to?

1.System.Int16

2.System.Int32

3.System.Int64

4.System.Int128


Question:
Considering the image, which of the following is the correct syntax for encoding a particular string in .Net framework 4.0?

1.Only a

2.Only b

3.Both a and b

4.None of These


Question:
How can you determine, at runtime, if your application is running in the 64-bit version of .Net framework 4.0?

1.Check IntPtr.Size property for a value of 8.

2.Call the Environment.GetEnvironmentVariable method and pass in the string "Platform" as an argument. Check for a return value of "x64".

3.Call the WOW64 emulator method Isx64() and check the boolean return value.<br>

4.None of the above


Question:
How do you add MetaDescription to your web page in .Net framework 4.0?
HtmlMeta meta2 = new HtmlMeta(); meta2.Name = "description";meta2.Content = "add meta description";Page.Header.Controls.Add(HtmlMeta ); 

1.Page.MetaDescription

2.Both a and b are correct.

3.Both a and b are correct.

4.None of the above.


Question:
How is data passed from controllers to views in an ASP.NET MVC Application?

1.Using ViewData

2.Using ViewState

3.Using Sessions

4.Using Cookies


Question:
How many classes can a single .NET DLL contain?

1.10

2.20

3.Unlimited

4.5


Question:
How many columns can you select by $orderby OData system query option in .Net Framework 4.0?

1.5

2.12

3.20

4.infinite


Question:
How will you count the odd numbers from the array shown below using LINQ in .Net framework 4.0?

int[]numbers={5,4,1,3,9,8,6,7,2,0};

1.int findoddNumbers = numbers.Count(n =&gt; n % 2 == 1);

2.int findoddNumbers = numbers.Count( n % 2 == 1);<br><br>

3.int findoddNumbers = (from number in numbers<br>where numbers%2==1<br>select Count());<br><br>

4.https://quizack.com/net/mcq/how-will-you-count-the-odd-numbers-from-the-array-shown-below-using-linq-in-net-framework-4-0-int-numbers-5-4-1-3-9-8-6-7-2-0#:~:text=int%20findoddNumbers%20%3D%20(from%20n


Question:
How will you display the view data in the view of an ASP.NET MVC Application?

1.%: ViewData["CurrentTime"] %&gt;

2.&lt;%=ViewData["CurrentTime"] %&gt;

3.%ViewData["CurrentTime"] %

4.&lt;ViewData["CurrentTime"] &gt;


Question:
How will you implement the logic for the following scenario in .Net framework 4.0?

Suppose you have a GridView with paging enabled. You select the third row on page 1 and then move to page 2. Nothing is selected on page 2. When you move back to page 1, the third row should still be selected.

1.Set the GridView DataKeyNames property.

2.Set the GridView EnablePersistedSelection property to true.

3.Set the Gridview PagerSettings-Mode property.

4.It is not possible to implement the given logic for the scenario described above.


Question:
In .NET framework, what are the options available for packaging?


1.CAB

2.EXE

3.MSI

4.All of the above


Question:
In WCF, what is the significance of the ReceiveRetryCount property of a Poison message in .Net framework 4.0?

1.It is an integer value that indicates the maximum number of times to retry delivery of a message from the application queue to the application.

2.It is an integer value that indicates the maximum number of retry cycles.

3.It is the time delay between retry cycles.

4.None of these


Question:
In which file can you define the "Process Model" attribute?

1.Web.config

2.Machine.config

3.In both files

4. In neither file


Question:
In.NET generics, the type parameter:

1.Needs to be constrained in container classes

2.Needs to be constrained in all the classes

3.Cannot be constrained in container classes

4.Cannot be constrained in any class


Question:
Suppose your site has a page called Index.aspx that you no longer use. Search engines may keep requesting this page.

Which of the following method will you add to the CodeBehind file of Index.aspx that will send requests (including search engine requests) to Default.aspx in .Net framework 4.0?

1.Server.Transfer

2.Response.Redirect

3.Response.RedirectPermanent

4.Server.Execute


Question:
The Process of automatic memory management involves the following tasks:

1.Allocating memory

2.Registering memory

3.Implementing finalizers

4.Using destroy


Question:
What is a Decorator in WPF of .Net framework 4.0?

1.It is used to add functional handles to elements or provide state information about a control.

2.It is the base class for elements that apply effects onto or around a single child element, such as Border or Viewbox.

3.It provides a set of services that can be used to extend the functionality of a common language runtime property.

4.It is a property with the exception that its value cannot be set outside the class that declared the read-only property.


Question:
What is default format used to represent data returned in an ADO.NET Data Services response in .Net framework 4.0?

1.XAML

2.SOAP

3.Atom

4.WSDL


Question:
What is DLR in .Net framework 4.0?

1.It defines the common types that are supported by the languages which are compatible with the .Net framework.

2.It represents the data types of different languages in a specific format specification.

3.It is a programming language that manages the execution of programs written in any of several supported languages, allowing them to share common object-oriented classes written in any of the languages

4.It is a runtime environment that adds a set of services for dynamic languages to the common language runtime.


Question:
What is the function of WCF Data contracts in .Net framework 4.0?

1.They define, for each parameter or return type, what data is serialized to be exchanged.

2.They define which operations the client can perform on the service.

3.They define which errors are raised by the service, and how the service handles and propagates errors to its clients.<br

4.None of These


Question:
What is the purpose of the System.Windows.Data namespace in .Net framework 4.0?

1.Using System.Windows.Data namespace, you can integrate rich media, including drawings, text, and audio/video content in Windows Presentation Foundation applications.

2.It contains classes used for binding properties to data sources, data source provider classes, and data-specific implementations of collections and views.

3.It provides the types that support navigation, including navigating between windows and navigation journaling.

4.It contains classes for creating windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system.


Question:
What result will you get when you run the following LINQ query in .Net framework 4.0?

List<string> alphabets = new List<string>() { "whats", "new", "in", "aspnet" };
  var alphabetsquery = from alphabet in alphabets select alphabet.Substring(0, 1);
  foreach (var alpha in alphabetsquery)
  {
    Response.Write(alpha);
  }

1.wina

2.whats

3.whatsnewinaspnet

4.aspnetinnewwhats


Question:
What result will you get when you run the following LINQ query in .Net framework 4.0?
var scoreRecords = new[] { new {Name = "Alice", Score = 50},
    new {Name = "Bob" , Score = 40},
    new {Name = "Cathy", Score = 45}
};

var scoreRecordsDict = scoreRecords.ToDictionary(sr =>sr.Name);

Response.Write(scoreRecordsDict["Bob"]);

1.{ Name = Bob}

2.{ Name = Bob, Score = 40 }

3.Name = Bob

4.None of the above


Question:
When are AssemblyHash values used?

1.They are used throughout the common language runtime to detect a change in assembly contents

2.They are used in the Common type system for type safety

3.They are used to change the metadata information in assemblies

4.None of These


Question:
Where is the Shared assembly generally stored?

1.Application's directory

2.Global assembly cache

3.C drive

4.None of the above


Question:
Which of the following are correct about delegates?

1.A delegate is an object that refers to a subroutine, function or other method

2.A delegate variable acts as a pointer to a subroutine or function

3.A delegate can not hold the address of a class's shared method

4.Delegate variables are sometimes called type-safe function pointers


Question:
Which of the following are included in a Static assembly?

1.Modules

2.Type metadata

3.MSIL code

4.Assembly manifest


Question:
Which of the following are public methods of System.Object?

1.GetHashCode()

2.GetType()

3.Equals()

4.All of the above


Question:
Which of the following arrays will be returned as result when you run the following LINQ query in .Net framework 4.0?

object[] varnumbers = { null, 1.0, "two", 3, "four", 5, "six", 7.0 };

var doubles = varnumbers.OfType<double>();

foreach (var d in doubles)
{
    Response.Write(d);
}

1.1, 7

2.null

3.two, four, six

4.null, 1.0, "two", 3, "four", 5, "six", 7.0


Question:
Which of the following ASP.NET MVC namespaces includes the classes that support forms, input controls, links, partial views, and validation in .Net Framework 4.0?

1.System.Web.Mvc

2.System.Web.Mvc.Async

3.System.Web.Mvc.Html

4.System.Web.Mvc.Sync


Question:
Which of the following classes of System.Windows.Media namespace provides rendering support in WPF which includes hit testing, coordinate transformation, and bounding box calculations in .Net framework 4.0?

1.HitTestResult

2.Visual

3.Colors

4.Brush


Question:
Which of the following helps expose COM components to the .NET framework?

1.RCW✖

2.CCA

3.CWA

4.CCW


Question:
Which of the following is correct for value and reference types in .NET?

1.Value types directly contain their data

2.Reference types store a reference to the value's memory address

3.Value types can be built-in but can't be user-defined

4.All of the above


Question:
Which of the following is NOT a valid data source control in .Net framework 4.0?

1.XmlDataSource

2.AccessDataSource

3.EntityDataSource

4.All of the above are valid data sources


Question:
Which of the following is NOT a valid QueryExtender filter option in .Net framework 4.0?

1.SearchExpression

2. RangeExpression

3.OrderByExpression

4.All of the above are valid QueryExtender filter options


Question:
Which of the following is NOT a valid WPF Localizability attribute in .Net framework 4.0?

1.Readability

2.Modifiability

3.Category

4.All of the above are Localizability attributes


Question:
Which of the following is not correct with regard to shared assembly?

1.Its version can be controlled by the author only

2.It can be shared by many applications

3.It must get registered with the machine registry

4.It is installed in the global assembly cache


Question:
Which of the following is the correct way to expand the size of application URLs in .Net framework 4.0?

1.&lt;httpModules maxRequestPathLength="260" maxQueryStringLength="2048" /&gt;

2.&lt;httpRuntime maxRequestPathLength="260" maxQueryStringLength="2048" /&gt;

3.&lt;httpHandlers maxRequestPathLength="260" maxQueryStringLength="2048" /&gt;

4.None of the above


Question:
Which of the following methods are used to stop a thread?

1.Thread.Interrupt()

2.Thread.Suspend()

3.Thread.Sleep()

4.Thread.Abort()


Question:
Which of the following OData system query options is used to determine the maximum number of records to be returned in .Net framework 4.0?

1.$top

2.$filter

3.$select

4. $expand


Question:
Which of the following pieces of information is provided by the WCF service contract in .Net framework 4.0?

1.The grouping of operations in a service.

2.The location of the operations.

3.The specific protocols and serialization formats that are used to support successful communication with the service.

4.All of the above


Question:
Which of the following protocols can be used for .Net Remoting?

1.TCP

2.HTTP

3.SMTP

4.All of the above


Question:
Which of the following protocols can be used for ASP.Net Web Services?

1.TCP

2.HTTP

3.SMTP

4.All of the above


Question:
Which of the following run In-Process?

1.EXE file

2.Resx file

3.DLL file

4.OCX file


Question:
Which of the following statements is correct for ASP.NET MVC Routing in .Net Framework 4.0?

1.It is used to match the incoming requests and to map them to a controller action.

2.It is used to construct the outgoing URLs which correspond to controller actions.

3.Both a and b are correct.

4.None of These


Question:
Which of the following statements is correct for the bubbling routing strategies used by the routing events in WPF in .Net framework 4.0?

1.This event is first raised on the root, then on each element down the tree until the source element is reached.

2.This event is only raised on the source element. It will have the same behavior as a plain .NET event, except that such events can still participate in mechanisms specific to routed events such as eve

3.This event is first raised on the source element, then on each element up the tree until the root is reached.

4.None of the above


Question:
Which of the following statements is correct for WSHttpBinding of WCF in .Net framework 4.0?

1.It is a secure and interoperable binding that is suitable for non-duplex service contracts.

2.It is a secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.

3.It is a secure and optimized binding suitable for cross-machine communication between WCF applications.

4.It is a queued binding that is suitable for cross-machine communication between WCF applications.


Question:
Which of the following statements is true?

1.You can access managed data from managed code

2.You can access managed data from managed and unmanaged code

3.Managed code can access both managed and unmanaged data

4.Managed code cannot access both managed and unmanaged data


Question:
Which of the following tools assists Assembly Signing?

1.CASPol.exe

2.PerfMon.exe

3.SN.exe

4.soapsuds.exe


Question:
Which of the following tools can be used to get the metadata information about the assembly and view IL code?

1.soapsuds.exe

2.lldasm.exe

3.al.exe✖

4.PerfMon.


Question:
Which of these are runtime hosts in .Net Framework?

1.CLR

2.IE

3.IIS .

4.ASP NET


Question:
Which Portable Executable (PE) file does not contain the assembly manifest?

1.Executable

2.DLL

3.Module

4.ALL


Question:
___________ class grants the permission to manipulate files located in the code assemblies, to code assemblies that match the membership condition.

1.FileCodeGroup

2.FirstMatchCodeGroup

3.CodeFileGroup

4.CodeGroup


More MCQS

  1. .NET Framework MCQ
  2. .NET MCQ Set 1
  3. .NET MCQ Set 2
  4. .NET MCQ Set 3
  5. .NET MCQ Set 4
  6. .NET MCQ Set 5
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!