Proper study guides for Up to the immediate present Microsoft Microsoft MTA Software Development Fundamentals certified begins with Microsoft 98-361 preparation products which designed to deliver the Actual 98-361 questions by making you pass the 98-361 test at your first time. Try the free 98-361 demo right now.
Q21. You are writing a C# program that needs to iterate a fixed number of times. You need to make sure that your code is easy to understand and maintain even when the loop body contains complex code. Which of the following C# statements provide the best solution for this requirement?
A. while
B. for
C. for each
D. do-while
Answer: B
Q22. You are C# developer who is developing a Windows application. You need to provide derived classes the ability to share common functionality with base classes but still define their own unique behavior. Which object oriented programming concept should you use to accomplish this functionality?
A. encapsulation
B. abstraction
C. polymorphism
D. inheritance
Answer: D
Q23. You write the following code in your Web page:
protected void Page_Load
(object sender, EventArgs e)
{
/* additional code here */
}
You expect this code to be executed in response to the Load event of the ASP.NET page. However, when you request the page, you notice that the method is not executed. What should you do to make sure that the Page_Load method is executed when the Load event of the Wep page is fired?
A. Set the AutoEventWireup attribute of the @page directive to true.
B. Set the AutoEventWireup attribute of the @page directive to false.
C. Set the IsCallBack property of the page class to true.
D. Set the IsPostBack property of the page class to true.
Answer: A
Q24. You have developed a Windows service that needs to access data stored in the Windows Registry. Which of the following accounts should you use for running this Windows service?
A. LocalSystem
B. NetworkService
C. LocalService
D. User (where the UserName property is set to a member of non-administrator role)
Answer: A
Q25. You are designing a database for your company. You are reviewing the normalization for the database tables.
You review the following Orders table:
Which of the following statement is true for the Orders table?
A. It meets the requirements for the first normal form.
B. It meets the requirements for the second normal form.
C. It meets the requirements for the third normal form.
D. It meets the requirements for the fourth normal form.
Answer: A
Q26. You are developing an ASP.NET application that uses a Web service created by one of your large customers. This Web service provides you with the Order object, which has several properties. The developer of the Web service has informed you that a new property named Priority has added to the Order object. What should you do to be able to use the Priority property in your code with minimum effort?
A. Create a new ASP.NET application and add a Web reference to the Web service in the new application.
B. Delete and re-create the Web reference in the existing ASP.NET application.
C. Update the Web reference in the existing ASP.NET application.
D. Ask the developer of the Web service forthe updatedDLL file of the Web service. Add a reference to theDLL in your ASP.NET project.
Answer: C
Q27. 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
Q28. You are developing a C# program that makes use of a singly linked list. You need to traverse all nodes of the list. Which of the following items will you need to accomplish this requirement?
A. link to the head node
B. link to the tail node
C. data in the head node
D. data in the tail node
Answer: A
Q29. You are writing a C# program that needs to manipulate very large integer values that may exceed 12 digits.
The values can be positive or negative. Which data type should you use to store a variable like this?
A. int
B. float
C. double
D. long
Answer: D
Q30. You are developing an application that stores data in SQL Server 2005 database. You need to write a query that retrieves all orders in the orders table that were placed on January 1, 2011. You write the following query:
SELECT * FROM Orders
WHERE OrderDate = 01/01/2011
The statement executes without any error but does not return any data. You are certain that the database contains order from this date. How should you correct the SQL statement?
A. SELECT * FROM Orders
WHERE OrderDate = #01/01/2011#
B. SELECT * FROM Orders
WHERE OrderDate = %01/01/2011%
C. SELECT * FROM Orders
WHERE OrderDate = '01/01/2011'
D. SELECT * FROM Orders
WHERE OrderDate = "01/01/2011"
Answer: C