70-483 Premium Bundle

70-483 Premium Bundle

Programming in C# Certification Exam

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

Microsoft 70-483 Free Practice Questions

Q1. DRAG DROP - (Topic 2) 

You create an assembly named Assembly1.dll. 

You need to ensure that Assembly1.dll can be deployed to the global assembly cache (GAC). 

Which commands should you run? (To answer, drag the appropriate programs to the correct locations. Each program 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:  

Q2. HOTSPOT - (Topic 1) 

You have the following code: 

For each of the following statements, select Yes if the statement is true. Otherwise, select No. 

Answer:  

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

Q4. - (Topic 2) 

You are developing an application by using C#. The application will write events to an event log. You plan to deploy the application to a server. 

You create an event source named AppSource and a custom log named AppLog on the server. 

You need to write events to the custom log. Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: Source should be AppSource: 

* New-EventLog 

Creates a new event log and a new event source on a local or remote computer. 

Parameters include: 

-Source<String[]> 

Specifies the names of the event log sources, such as application programs that write to the event log. This parameter is required. 

Q5. DRAG DROP - (Topic 1) 

You are developing an application that will populate an extensive XML tree from a Microsoft SQL Server 2008 R2 database table named Contacts. 

You are creating the XML tree. The solution must meet the following requirements: . Minimize memory requirements. . Maximize data processing speed. You open the database connection. You need to create the XML tree. 

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:  

Q6. - (Topic 2) 

You are developing an application that generates code. The application includes the following code segment. (Line numbers are included for reference only.) 

You need to ensure that code generated by the GenerateCode() method represents a class that can be accessed by all objects in its application domain. 

Which two code segments can you insert at line 05 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,C 

Q7. DRAG DROP - (Topic 1) 

You are developing a class named ExtensionMethods. 

You need to ensure that the ExtensionMethods class implements the IsEmail() extension 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:  

Q8. - (Topic 2) 

You are debugging a 64-bit C# application. 

Users report System.OutOfMemoryException exceptions. The system is attempting to use arrays larger than 2 GB in size. 

You need to ensure that the application can use arrays larger than 2 GB. 

What should you do? 

A. Add the /3GB switch to the boot.ini file for the operating system. 

B. Set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the image header for the application executable file. 

C. Set the value of the gcAllowVeryLargeObjects property to true in the application configuration file. 

D. Set the value of the user-mode virtual address space setting for the operating system to MAX. 

Answer:

Q9. - (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 5 and the loanAmount value is 4500, the loanRate must be set to 6.5 percent. 

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

What should you do? 

A. Replace line 15 with the following code segment: loanRate = 0.065m; 

B. Replace line 07 with the following code segment: loanRate = 0.065m; 

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

D. Replace line 04 with the following code segment: decimal loanRate = 0.065m; 

Answer:

Q10. - (Topic 1) 

An application will upload data by using HTML form-based encoding. The application uses a method named SendMessage. 

The SendMessage() method includes the following code. (Line numbers are included for reference only.) 

The receiving URL accepts parameters as form-encoded values. 

You need to send the values intA and intB as form-encoded values named a and b, 

respectively. 

Which code segment should you insert at line 04? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: 

WebClient.UploadValuesTaskAsync - Uploads the specified name/value collection to the resource identified by the specified URI as an asynchronous operation using a task object. These methods do not block the calling thread. http://msdn.microsoft.com/en-us/library/system.net.webclient.uploadvaluestaskasync.aspx 

Q11. - (Topic 2) 

You are troubleshooting an application that uses a class named FullName. The class is decorated with the DataContractAttribute attribute. The application includes the following code. (Line numbers are included for reference only.) 

You need to ensure that the entire FullName object is serialized to the memory stream object. 

Which code segment should you insert at line 09? 

A. binary.WriteEndElement(); 

B. binary.NriteEndDocument(); 

C. ms.Close() ; 

D. binary.Flush(); 

Answer:

Explanation: * DataContractSerializer.WriteEndObject Method (XmlDictionaryWriter) Writes the closing XML element using an XmlDictionaryWriter. 

* Note on line 07: DataContractSerializer.WriteObject Method Writes all the object data (starting XML element, content, and closing element) to an XML document or stream. 

XmlDictionaryWriter 

Q12. - (Topic 1) 

You are implementing a method named FloorTemperature that performs conversions between value types and reference types. The following code segment implements the method. (Line numbers are included for reference only.) 

You need to ensure that the application does not throw exceptions on invalid conversions. Which code segment should you insert at line 04? 

A. int result = (int)degreesRef; 

B. int result = (int)(double)degreesRef; 

C. int result = degreesRef; 

D. int result = (int)(float)degreesRef; 

Answer:

Q13. - (Topic 1) 

An application receives JSON data in the following format: 

The application includes the following code segment. (Line numbers are included for reference only.) 

You need to ensure that the ConvertToName() method returns the JSON input string as a Name object. 

Which code segment should you insert at line 10? 

A. Return ser.Desenalize (json, typeof(Name)); 

B. Return ser.ConvertToType<Name>(json); 

C. Return ser.Deserialize<Name>(json); 

D. Return ser.ConvertToType (json, typeof (Name)); 

Answer:

Q14. - (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 need to ensure that the debugger breaks execution within the CalculateInterest() method when the loanAmount variable is less than or equal to zero in all builds of the application. 

What should you do? 

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

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

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

D. Insert the following code segment at line 05: Trace.Write(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 

Q15. 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:  

START 70-483 EXAM