Given a string s, write expressions for: The string consisting of the first letter The
Question:
Given a string s, write expressions for:
• The string consisting of the first letter
• The string consisting of the first and last letter
• The string consisting of all but the first and last letter
• The first half of the string (discarding the middle letter if the string has odd length)
• The second half of the string (discarding the middle letter if the string has odd length)
• The string consisting of the middle letter if the string has odd length, or the middle two letters otherwise
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: