exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 1 question 2 discussion

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

You are developing an application. The application calls a method that returns an array of integers named employeeIds. You define an integer variable named employeeIdToRemove and assign a value to it. You declare an array named filteredEmployeeIds.
You have the following requirements:
✑ Remove duplicate integers from the employeeIds array.
✑ Sort the array in order from the highest value to the lowest value.
Remove the integer value stored in the employeeIdToRemove variable from the employeeIds 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
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
apostolin
Highly Voted 5 years, 9 months ago
Correct answer is : C. int[] filteredEmployeeIds = employeeIds.Distinct().Where(value => value !=employeeIdToRemove).OrderByDescending(x => x).ToArray();
upvoted 5 times
...
zzMichielzz
Most Recent 4 years, 8 months ago
C. try to remember the distinct and the condition...
upvoted 2 times
...
cshine
4 years, 9 months ago
Ans : C
upvoted 2 times
...
XardasLord
5 years ago
Correct answer: C
upvoted 2 times
...
robinnirola
5 years, 1 month ago
Ans : C
upvoted 2 times
...
tanujgyan
5 years, 2 months ago
C is the correct answer
upvoted 2 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 ...