UiPath RPA Associate (UiRPA) — Question 13

A developer has defined the StrVar variable of type String. Which expression should the developer use to return four characters starting with the second character?

Answer options

Correct answer: A

Explanation

The correct answer is A, as StrVar.Substring(1, 4) starts from index 1 (the second character) and retrieves four characters, which meets the requirement. Option B retrieves five characters instead of four, while options C and D start from the wrong index, which does not align with the request for starting at the second character.