70-483 Premium Bundle

70-483 Premium Bundle

Programming in C# Certification Exam

4.5 
(15060 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 21, 2024Last update

Microsoft 70-483 Free Practice Questions

Q1. HOTSPOT - (Topic 1) 

You are developing an application that includes a Windows Communication Foundation (WCF) service. The service includes a custom TraceSource object named ts and a method named DoWork. The application must meet the following requirements: 

. Collect trace information when the DoWork() method executes. . Group all traces for a single execution of the DoWork() method as an activity that can be viewed in the WCF Service Trace Viewer Tool. 

You need to ensure that the application meets the requirements. 

How should you complete the relevant code? (To answer, select the correct code segment from each drop-down list in the answer area.) 

Answer:  

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

Q3. DRAG DROP - (Topic 2) 

You have a method that will evaluate a parameter of type Int32 named Status. You need to ensure that the method meets the following requirements: 

If Status is set to Active, the method must return 1. 

If Status is set to Inactive, the method must return 0. 

If Status is any other value, the method must return -1. 

What should you do? (To answer, drag the appropriate statement to the correct location in the answer area. Each statement 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 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. RSA 

B. HMACSHA2S6 

C. Aes 

D. RNGCryptoServiceProvider 

Answer:

Q5. - (Topic 2) 

You are implementing a method named GetValidPhoneNumbers. The GetValidPhoneNumbers() method processes a list of string values that represent phone numbers. 

The GetValidPhoneNumbers() method must return only phone numbers that are in a valid format. 

You need to implement the GetValidPhoneNumbers() method. 

Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. Choose two.) 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A,B 

Explanation: * Regex.Matches Searches an input string for all occurrences of a regular expression and returns all the matches. 

* MatchCollection 

Represents the set of successful matches found by iteratively applying a regular 

expression pattern to the input string. 

The collection is immutable (read-only) and has no public constructor. The Regex.Matches 

method returns a MatchCollection object. 

* List<T>.Add Method 

Adds an object to the end of the List<T>. 

Q6. - (Topic 1) 

You are developing an application that uses structured exception handling. The application includes a class named Logger. The Logger class implements a method named Log by using the following code segment: 

public static void Log(Exception ex) { } 

You have the following requirements: 

. Log all exceptions by using the Log() method of the Logger class. 

. Rethrow the original exception, including the entire exception stack. 

You need to meet the requirements. Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q7. DRAG DROP - (Topic 2) 

You are creating a class named Data that includes a dictionary object named _data. 

You need to allow the garbage collection process to collect the references of the _data object. 

You have the following code: 

Which code segments should you include in Target 1 and Target 2 to complete the 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:  

Q8. - (Topic 1) 

You have a List object that is generated by executing the following code: 

You have a method that contains the following code (line numbers are included for reference only): 

You need to alter the method to use a lambda statement. How should you rewrite lines 03 through 06 of the method? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q9. - (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. ECDsa 

B. RNGCryptoServiceProvider 

C. Rfc2898DeriveBytes 

D. HMACSHA512 

Answer:

Q10. DRAG DROP - (Topic 2) 

You are adding a function to a membership tracking application- The function uses an integer named memberCode as an input parameter and returns the membership type as a string. 

The function must meet the following requirements: 

Return "Non-Member" if the memberCode is 0. 

Return "Member" if the memberCode is 1. 

Return "Invalid" if the memberCode is any value other than 0 or 1. 

You need to implement the function to meet the requirements. 

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

Q11. DRAG DROP - (Topic 1) 

You are developing a class named ExtensionMethods. 

You need to ensure that the ExtensionMethods class implements the IsEmail() method on string objects. 

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:  

Q12. - (Topic 2) 

You are developing a class named Account that will be used by several applications. The applications that will consume the Account class will make asynchronous calls to the Account class to execute several different methods. 

You need to ensure that only one call to the methods is executed at a time. 

Which keyword should you use? 

A. sealed 

B. protected 

C. checked 

D. lock 

Answer:

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

Q14. - (Topic 2) 

You need to write a method that retrieves data from a Microsoft Access 2013 database. The method must meet the following requirements: 

Be read-only. 

Be able to use the data before the entire data set is retrieved. 

Minimize the amount of system overhead and the amount of memory usage. 

Which type of object should you use in the method? 

A. DbDataAdapter 

B. unTyped DataSet 

C. OleDbDataAdapter 

D. DbDataReader 

Answer:

Explanation: The DbDataReader class reads a forward-only stream of rows from a data source. 

Reference: DbDataReader Class 

https://msdn.microsoft.com/en-us/library/system.data.common.dbdatareader(v=vs.110).aspx 

Q15. - (Topic 2) 

You are developing an application that will parse a large amount of text. 

You need to parse the text into separate lines and minimize memory use while processing data. 

Which object type should you use? 

A. DataContractSerializer 

B. StringBuilder 

C. StringReader 

D. JsonSerializer 

Answer:

START 70-483 EXAM