English

Write a statement to perform the following task on a string: Find and display the position of the last space in a string s. - Computer Applications

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]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
EXERCISES | Q VII. 4. (i) | Page 289
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×