★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions
Free Instant Download NEW 98-361 Exam Dumps (PDF & VCE):
Available on:
https://www.certleader.com/98-361-dumps.html
Exam Code: 98-361 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Microsoft MTA Software Development Fundamentals
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 98-361 Exam.
2021 Feb exam 98-361 sample questions:
Q71. In your application, you are using a queue data structure to manipulate information. You need to find whether a data item exists in the queue, but you don’t want to actually process that data item yet. Which of the following queue operations will you use?
A. enqueue
B. dequeue
C. peek
D. contains
Answer: D
Q72. You are writing code to handle events in your program. You define a delegate named PolygonHandler like this:
public delegate void PolygonHandler(Polygon p);
You also create a variable of the PolygonHandler type as follows:
PolygonHandler handler;
Later in the program, you need to add a method named CalculateArea to the method invocation list of the handler variable. The signature of the CalculateArea method matches the signature of the PolygonHandler method. Any code that you write should not affect any existing event-handling code. Given this restriction, which of the following code lines should you write?
A. handler = new PolygonHandler(CalculateArea);
B. handler = CalculateArea;
C. handler += CalculateArea;
D. handler -= CalculateArea;
Answer: C
Q73. You are developing a C# program. You write a recursive method to calculate the factorial of a number. Which of the following code segment should you use to generate correct results?
A. public static int Factorial(int n)
{
if (n == 0)
{
return 1;
}
else
{
return n * Factorial(n - 1);
}
}
B. public static int Factorial(int n)
{
if (n == 0)
{
return 1;
}
else
{
return (n – 1) * Factorial(n);
}
}
C. public static int Factorial(int n)
{
if (n == 0)
{
return n;
}
else
{
return Factorial(n - 1);
}
}
D. public static int Factorial(int n)
{
return n * Factorial(n - 1);
}
Answer: A
Q74. You want to display an image on your Web page. This image is stored on a separate Web server but can be accessed with a public URL. Which of the following HTML tags should you use to ensure that the image is displayed when the user navigates to your Web page?
A. <LINK>
B. <IMG>
C. <A>
D. <HTML>
Answer: B
Q75. You have developed a Windows service and need to install it to implement its functionality. Which of the following options should you use to accomplish this task?
A. Visual Studio Server Explorer
B. Services node in the Computer Management window
C. InstallUtil.exe
D. gacutil.exe
Answer: C
Far out egzamin 98-361:
Q76. You are developing a C# application. You create a class of the name Widget. You use some third-party libraries, one of which also contains a class of the name Widget. You need to make sure that using the Widget class in your code causes no ambiguity. Which C# keyword should you use to address this requirement?
A. namespace
B. override
C. delegate
D. class
Answer: A
Q77. You have written a C# method that opens a database connection by using the SqlConnect object. The method retrieves some information from the database and then closes the connection. You need to make sure that your code fails gracefully when there is a database error. To handle this situation, you wrap the database code in a try-catch-finally block. You use two catch blocks—one to catch the exceptions of type SqlException and the second to catch the exception of type Exception. Which of the following places should be the best choice for closing the SqlConnection object?
A. Inside the try block, before the first catch block
B. Inside the catch block that catches SqlException objects
C. Inside the catch block that catches Exception objects
D. Inside the finally block
Answer: D
Q78. You are C# developer who is developing a Windows application. You write the following code:
Object o;
Later in the code, you need to assign the value in the variable o to an object of Rectangle type. You expect that at runtime the value in the variable o is compatible with the Rectangle class. However, you need to make sure that no exceptions are raised when the value is assigned. Which of the following code should you use?
A. Rectangle r = (Rectangle) o;
B. Rectangle r = o;
C. Rectangle r = o as Rectangle;
D. Rectangle r = o is Rectangle;
Answer: D
Q79. You are developing a new application that optimizes the processing of a warehouse’s operations. When the products arrive, they are stored on warehouse racks. To minimize the time it takes to retrieve an item, the items that arrive last are the first to go out. You need to represent the items that arrive and leave the warehouse in a data structure. Which data structure should you use to represent this situation?
A. array
B. linked list
C. stack
D. queue
Answer: C
Q80. You created a class named GeoShape. You defined a method called Area in the GeoShape class. This method calculates the area of a geometric shape. You want the derived classes of GeoShape to supersede this functionality to support the area calculation of additional geometric shapes. When the method Area is invoked on a GeoShape object, the area should be calculated based on the runtime type of the GeoShape object. Which keyword should you use with the definition of the Area method in the GeoShape class?
A. abstract
B. virtual
C. new
D. overrides
Answer: B