InterviewSolution
Saved Bookmarks
| 1. |
Which is the function to get the character present at a particular index in the string?(a) char charAt(index);(b) char charIn(StringName);(c) char charAt(StringName);(d) char charIn(index); |
|
Answer» Right answer is (a) char charAt(index); The explanation: The function can be called using dot operator with the string object. Char is the return type of the function to return the character at specified position. The index must be an integer value, less than the length of string. |
|