InterviewSolution
Saved Bookmarks
| 1. |
The function lastIndexOf() is used to ___________________(a) Get the index of last occurrence of specified character in argument(b) Get the index of first occurrence of specified character in argument(c) Get the index of last occurrence of first character in string(d) Get the index of last occurrence of last character of string |
|
Answer» Right choice is (a) Get the index of last occurrence of specified character in argument For explanation: The function is used to get the last occurrence index of a character present in a string. The return type is char. Single character is returned. The function is used with a string object and the target character is passed as its argument. |
|