aiotestking uk

70-483 Exam Questions - Online Test


70-483 Premium VCE File

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

Q1. - (Topic 1) 

You have the following code (line numbers are included for reference only): 

You need to identify the missing line of code at line 15. Which line of code should you identify? 

A. using (fooSqlConn.BeginTransaction()) 

B. while (fooSqlReader.Read()) 

C. while (fooSqlReader.NextResult()) 

D. while (fooSqlReader.GetBoolean(0)) 

Answer:

Q2. - (Topic 2) 

You are implementing a new method named ProcessData. The ProcessData() method calls a third-party component that performs a long-running operation. 

The third-party component uses the IAsyncResult pattern to signal completion of the long-running operation. 

You need to ensure that the calling code handles the long-running operation as a System.Threading.Tasks.Task object. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Call the component by using the TaskFactory.FromAsync() method. 

B. Create a TaskCompletionSource<T> object. 

C. Apply the async modifier to the method signature. 

D. Apply the following attribute to the method signature: [MethodImpl(MethodImplOptions.Synchronized)] 

Answer: A,B 

Explanation: A: TaskFactory.FromAsync Method 

Creates a Task that represents a pair of begin and end methods that conform to the 

Asynchronous Programming Model pattern. Overloaded. 

Example: 

TaskFactory.FromAsync Method (IAsyncResult, Action<IAsyncResult>) 

Creates a Task that executes an end method action when a specified IAsyncResult 

completes. 

B: In many scenarios, it is useful to enable a Task<TResult> to represent an external asynchronous operation. TaskCompletionSource<TResult> is provided for this purpose. It enables the creation of a task that can be handed out to consumers, and those consumers can use the members of the task as they would any other. However, unlike most tasks, the state of a task created by a TaskCompletionSource is controlled explicitly by the methods on TaskCompletionSource. This enables the completion of the external asynchronous operation to be propagated to the underlying Task. The separation also ensures that consumers are not able to transition the state without access to the corresponding TaskCompletionSource. 

Note: 

* System.Threading.Tasks.Task Represents an asynchronous operation. 

Q3. DRAG DROP - (Topic 2) 

An application serializes and deserializes XML from streams. The XML streams are in the following format: 

The application reads the XML streams by using a DataContractSerializer object that is declared by the following code segment: 

You need to ensure that the application preserves the element ordering as provided in the XML stream. 

You have the following code: 

Which attributes should you include in Target 1, Target 2 and Target 3 to complete the code? (To answer, drag the appropriate attributes to the correct targets in the answer area. Each attribute may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.) 

Answer:  

Q4. - (Topic 2) 

You are developing a game that allows players to collect from 0 through 1000 coins. You are creating a method that will be used in the game. The method includes the following code. (Line numbers are included for reference only.) 

01 public string FormatCoins(string name, int coins) 

02 { 

04 } 

The method must meet the following requirements: 

Return a string that includes the player name and the number of coins. Display the number of coins without leading zeros if the number is 1 or greater. Display the number of coins as a single 0 if the number is 0. 

You need to ensure that the method meets the requirements. 

Which code segment should you insert at line 03? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q5. - (Topic 2) 

You are developing a method named GenerateHash that will create the hash value for a file. The method includes the following code. (Line numbers are included for reference only.) 

You need to return the cryptographic hash of the bytes contained in the fileBuffer variable. Which code segment should you insert at line 05? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q6. - (Topic 2) 

You are developing a class named Scorecard. The following code implements the Scorecard class. (Line numbers are included for reference only.) 

You create the following unit test method to test the Scorecard class implementation: 

You need to ensure that the unit test will pass. What should you do? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q7. - (Topic 2) 

You are evaluating a method that calculates loan interest- The application includes the following code segment. (Line numbers are included for reference only.) 

When the loanTerm value is 3 and the loanAmount value is 9750, the loanRate must be set to 8.25 percent. 

You need to adjust the loanRate value to meet the requirements. 

What should you do? 

A. Replace line 04 with the following code segment: decimal loanRate = 0.0325m; 

B. Replace line 17 with the following code segment: interestAmount = loanAmount * 0.0825m * loanTerm; 

C. Replace line 15 with the following code segment: loanRate = 0.0825m; 

D. Replace line 07 with the following code segment: loanRate = 0.0825m; 

Answer:

Q8. - (Topic 1) 

You are debugging an application that calculates loan interest. The application includes the following code. (Line numbers are included for reference only.) 

You have the following requirements: 

. The debugger must break execution within the Calculatelnterest() method when the loanAmount variable is less than or equal to zero. . The release version of the code must not be impacted by any changes. 

You need to meet the requirements. 

What should you do? 

A. Insert the following code segment at tine 05: Debug.Write(loanAmount > 0); 

B. Insert the following code segment at line 05: Trace.Write(loanAmount > 0); 

C. Insert the following code segment at line 03: Debug.Assert(loanAmount > 0); 

D. Insert the following code segment at line 03: Trace.Assert(loanAmount > 0); 

Answer:

Explanation: 

By default, the Debug.Assert method works only in debug builds. Use the Trace.Assert method if you want to do assertions in release builds. For more information, see Assertions in Managed Code. http://msdn.microsoft.com/en-us/library/kssw4w7z.aspx 

Q9. HOTSPOT - (Topic 1) 

You are developing an application in C#. 

The application will display the temperature and the time at which the temperature was recorded. You have the following method (line numbers are included for reference only): 

You need to ensure that the message displayed in the lblMessage object shows the time formatted according to the following requirements: 

The time must be formatted as hour:minute AM/PM, for example 2:00 PM. 

The date must be formatted as month/day/year, for example 04/21/2013. 

The temperature must be formatted to have two decimal places, for example 23-

45. 

Which code should you insert at line 04? (To answer, select the appropriate options in the answer area.) 

Answer:  

Q10. - (Topic 2) 

You have the following code (line numbers are included for reference only): 

You need to ensure that if an exception occurs, the exception will be logged. Which code should you insert at line 28? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: * XmlWriterTraceListener 

Directs tracing or debugging output as XML-encoded data to a TextWriter or to a Stream, 

such as a FileStream.