exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 96 discussion

Actual exam question from Microsoft's 70-483
Question #: 96
Topic #: 2
[All 70-483 Questions]

You develop an application by using C#. The application counts the number of times a specific word appears within a set of text files. The application includes the following code. (Line numbers are included for reference only.)

You have the following requirements:
✑ Populate the _wordCounts object with a list of words and the number of occurrences of each word.
✑ Ensure that updates to the ConcurrentDictionary object can happen in parallel.
You need to complete the relevant code.
Which code segment should you insert at line 23?

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
supersunny
Highly Voted 5 years, 11 months ago
A is correct
upvoted 13 times
rah26
4 years, 9 months ago
B,C and D are not correct
upvoted 4 times
...
...
noofalrawahi2020
Most Recent 4 years, 5 months ago
A is correct
upvoted 1 times
...
dale
4 years, 8 months ago
C, D and B wouldnt make sense
upvoted 1 times
...
Christiann
4 years, 9 months ago
Where are s and n declared??
upvoted 1 times
Damage_San
4 years, 9 months ago
it's an anonymous function/lambda expression, this may help https://www.tutorialsteacher.com/linq/linq-lambda-expression
upvoted 2 times
...
...
HgstExam
4 years, 9 months ago
A does sound correct, I was wondering why D cannot be used, it seems because it would not work correctly in parallel, therefore A, anyone know why?
upvoted 1 times
...
BurgSharp
4 years, 12 months ago
A. https://docs.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2.addorupdate?view=netcore-3.1
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...