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”)?
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”)?
When using the LastIndexOf function on the string 'UIPATH STUDIO', it will return the index of the last occurrence of the specified character 'U'. In this case, the last 'U' is found at index 9, when counting index positions starting from 0.
Answer should be C. When you use the LastIndexOf function in the "UIPATH STUDIO", it will return the index of the last occurrence of the character "U". Since indexing is 0 based, the position is 9.
C as the last index would be that last U
Tested the answer is 9 "C"