UiPath AI Specialist v1 — Question 18
What does the following expression do?
subTotalAdditions.Select(Function(field) CDec(documentFields(field))).ToList.Sum() + subtotal
Answer options
- A. Sums up subtotal fields from the config file converted to CDec with the subtotal.
- B. Sums up all the line amounts and converts the fields to CDec.
- C. Sums up all the line amounts converted to CDec and the subtotal.
- D. Sums up the subtotal to the total variable by converting it to CDec.
Correct answer: C
Explanation
The correct answer is C because the expression specifically sums all line amounts after converting them to CDec and adds the subtotal to this total. Option A incorrectly references the config file, option B does not account for adding the subtotal, and option D misrepresents the operation as converting the subtotal instead of summing it.