Advertisements
Advertisements
Question
Write a statement to perform the following task on a string:
Find and display the position of the last space in a string s.
Code Writing
Solution
int p = s.lastIndexOf('__');
shaalaa.com
Is there an error in this question or solution?
Chapter 4: String Handling - EXERCISES [Page 289]