aiotestking uk

98-361 Exam Questions - Online Test


98-361 Premium VCE File

Learn More 100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours

Q1. You are developing a C# application. You need to decide whether to declare a class member as static. Which of the following statements is true about static members of a class? 

A. You can use the this keyword reference with a static method or property. 

B. Only one copy of a static field is shared by all instances of a class. 

C. Static members of a class can be used only after an instance of a class is created. 

D. The static keyword is used to declare members that do not belong to individual objects but to a classitself. 

Answer:

Q2. You are developing a restaurant locator Web sitr in ASP.NET and C#. As users browse through the Web site, each of the Web pages must display a list of the recently viewed restaurant in the lower left corner. You want this information to be available across Web pages and browser restarts but do not want to use server side resources to accomplish this. Which of the following state management techniques will help you accomplish this requirement with minimum effort? 

A. hidden fields 

B. view state 

C. cookies 

D. sessions 

Answer:

Q3. You are developing an application that will be run from the command line. Which of the following methods would you use for getting input from to the command line? 

A. File.Read 

B. File.Write 

C. Console.Read 

D. Console.Write 

Answer:

Q4. You are in the process of developing a new software application. As defects are reported, you take the necessary steps to fix them. You need to make sure that each new fix doesn’t break anything that was previously working. Which type of testing should you use? 

A. integration testing 

B. system testing 

C. acceptance testing 

D. regression testing 

Answer:

Q5. 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

Q6. You have developed two console applications. The first, DisplayFile.exe, accepts the name of a text file as a command-line argument and displays the file’s contents. The second, ToUpper.exe, accepts text from users and converts the text to uppercase letters. You need to combine both commands so that contents of a given file (sample.txt) can be displayed in uppercase letters. Which of the following commands would you choose? 

A. ToUpper | DisplayFile Sample.txt 

B. DisplayFile Sample.txt | ToUpper 

C. ToUpper > DisplayFile Sample.txt 

D. DisplayFile Sample.txt > ToUpper 

Answer:

Q7. You are developing a new Windows application that needs to write messages to the event log. You use the EventLog class to write these messages. Each event log message must specify the name of the application writing to an event log. Which property of the EventLog class should you use? 

A. Source 

B. Log 

C. Site 

D. MachineName 

Answer:

Q8. You are developing an algorithm before you write the C# program. You need to perform some calculations on a number. You develop the following flowchart for the calculation: 

If the input value of n is 5, what is the output value of the variable fact according to this flowchart? 

A. 720 

B. 120 

C. 24 

D. 6 

Answer:

Q9. Your application includes a SqlDataAdapter object named sqlDataAdapter and an OleDbDataAdapter object named oledbdataAdapter. You need to connect to the Employees table of a SQL Server database. Your application also includes a DataSet object named dsEmployees. You need to load the data from the database into the DataSet object. You must select a solution that gives you the best performance. Which of the following lines of code should you choose? 

A. dsEmployees = sqlDataAdapter.Fill(“Employees”); 

B. dsEmployees = oledbDataAdapter.Fill(“Employees”); 

C. oledbDataAdapter.Fill(dsEmployees, "Employees"); 

D. sqlDataAdapter.Fill(dsEmployees, “Employees”); 

Answer:

Q10. You are creating a new class named Polygon. You write the following code: 

class Polygon : IComparable 

public double Length { get; set; } 

public double Width { get; set; } 

public double GetArea() 

return Length * Width; 

public int CompareTo(object obj) 

// to be completed 

You need to complete the definition of the CompareTo method to enable comparison of the Polygon objects. 

Which of the following code segments should you use? 

A. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

double diff = this.GetArea() - target.GetArea(); 

if (diff == 0) 

return 0; 

else if (diff > 0) 

return 1; 

else return -1; 

B. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

double diff = this.GetArea() - target.GetArea(); 

if (diff == 0) 

return 1; 

else if (diff > 0) 

return -1; 

else return 0; 

C. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

if (this == target) 

return 0; 

else if (this > target) 

return 1; 

else return -1; } 

D. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

if (this == target) 

return 1; 

else if (this > target) 

return -1; 

else return 0; 

Answer: