UiPath RPA Associate (UiRPA) — Question 52

A developer has declared a variable of type String named StrVar and assigned it the value “UIPATH STUDIO”. What is the output of the expression, StrVar.LastIndexOf(“U”)?

Answer options

Correct answer: C

Explanation

The method LastIndexOf returns the last occurrence of the specified character in the string. In the string "UIPATH STUDIO", the last 'U' appears at index 9, making option C the correct answer. Options A, B, and D are incorrect as they do not correspond to the position of the last 'U' in the string.