Exam Code: microsoft exam 70 483 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Programming in C#
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass exam ref 70 483 programming in c# Exam.

Q31. - (Topic 1) 

You are developing an application. The application calls a method that returns an array of integers named customerIds. You define an integer variable named customerIdToRemove and assign a value to it. You declare an array named filteredCustomerIds. 

You have the following requirements. 

Remove duplicate integers from the customerIds array. 

Sort the array in order from the highest value to the lowest value. 

Remove the integer value stored in the customerIdToRemove variable from the 

customerIds array. 

You need to create a LINQ query to meet the requirements. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q32. - (Topic 1) 

You are developing an application that will transmit large amounts of data between a client computer and a server. 

You need to ensure the validity of the data by using a cryptographic hashing algorithm. 

Which algorithm should you use? 

A. HMACSHA256 

B. RNGCryptoServiceProvider 

C. DES 

D. Aes 

Answer:

Explanation: 

The .NET Framework provides the following classes that implement hashing algorithms: 

HMACSHA1. 

MACTripleDES. 

MD5CryptoServiceProvider. 

RIPEMD160. 

SHA1Managed. 

SHA256Managed. 

SHA384Managed. 

SHA512Managed. 

HMAC variants of all of the Secure Hash Algorithm (SHA), Message Digest 5 (MD5), and 

RIPEMD-160 algorithms. 

CryptoServiceProvider implementations (managed code wrappers) of all the SHA 

algorithms. 

Cryptography Next Generation (CNG) implementations of all the MD5 and SHA algorithms. 

http://msdn.microsoft.com/en-us/library/92f9ye3s.aspx#hash_values 


Q33. - (Topic 1) 

You are testing an application. The application includes methods named CalculateInterest and LogLine. The CalculateInterest() method calculates loan interest. The LogLine() method sends diagnostic messages to a console window. 

The following code implements the methods. (Line numbers are included for reference only.) 

You have the following requirements: 

. The Calculatelnterest() method must run for all build configurations. . The LogLine() method must run only for debug builds. 

You need to ensure that the methods run correctly. 

What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.) 

A. Insert the following code segment at line 01: 

#region DEBUG 

Insert the following code segment at line 10: 

#endregion 

B. Insert the following code segment at line 10: 

[Conditional(MDEBUG")] 

C. Insert the following code segment at line 05: 

#region DEBUG 

Insert the following code segment at line 07: 

#endregion 

D. Insert the following code segment at line 01: 

#if DE30G 

Insert the following code segment at line 10: 

#endif 

E. Insert the following code segment at line 01: 

[Conditional(MDEBUG")] 

F. Insert the following code segment at line 05: 

#if DEBUG 

Insert the following code segment at line 07: 

#endif 

G. Insert the following code segment at line 10: [Conditional("RELEASE")] 

Answer: B,F 

Explanation: 

#if DEBUG: The code in here won't even reach the IL on release. [Conditional("DEBUG")]: This code will reach the IL, however the calls to the method will not execute unless DEBUG is on. http://stackoverflow.com/questions/3788605/if-debug-vs-conditionaldebug 


Q34. DRAG DROP - (Topic 1) 

You are developing an application that implements a set of custom exception types. You declare the custom exception types by using the following code segments: 

The application includes a function named DoWork that throws .NET Framework exceptions and custom exceptions. The application contains only the following logging methods: 

The application must meet the following requirements: 

. When ContosoValidationException exceptions are caught, log the information by using the static void Log (ContosoValidationException ex) method. . When ContosoDbException or other ContosoException exceptions are caught, log the information by using the static void Log(ContosoException ex) method. 

You need to meet the requirements. 

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment 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: 


Q35. - (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:


Q36. DRAG DROP - (Topic 2) 

You are developing a class named Temperature. 

You need to ensure that collections of Temperature objects are sortable. 

You have the following code: 

Which code segments should you include in Target 1, Target 2 and Target 3 to complete the code? (To answer, drag the appropriate code segments to the correct targets in the answer area. Each code segment 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: 


Q37. - (Topic 2) 

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

You create the following unit test method to test the EmployeeRoster 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:


Q38. - (Topic 2) 

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

You need to ensure that new instances of Connection can be created only by other classes by calling the Create method. The solution must allow classes to inherit from Connection. 

What should you do? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: The following list provides the main features of a static class: 

* Contains only static members. 

* Cannot be instantiated. 

* Is sealed. 

* Cannot contain Instance Constructors. 

Creating a static class is therefore basically the same as creating a class that contains only static members and a private constructor. A private constructor prevents the class from being instantiated. 

Reference: Static Classes and Static Class Members (C# Programming Guide) 

https://msdn.microsoft.com/en-us/library/79b3xss3.aspx 


Q39. - (Topic 2) 

You have an application that will send confidential information to a Web server. 

You need to ensure that the data is encrypted when it is sent across the network. 

Which class should you use? 

A. CryptoStream 

B. AuthenticatedStream 

C. PipeStream 

D. NegotiateStream 

Answer:


Q40. DRAG DROP - (Topic 1) 

You are developing a custom collection named LoanCollection for a class named Loan class. 

You need to ensure that you can process each Loan object in the LoanCollection collection by using a foreach loop. 

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment 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: