The output of the function "COMPOSITION". substring(3, 6):
Advertisements
Question
The output of the function "COMPOSITION". substring(3, 6):
Options
POST
MPO
POS
MPOS
MCQ
Advertisements
Solution
POS
Explanation:
The substring() function returns characters from start to endindex-1. So "COMPOSITION".substring(3, 6) returns characters from index 3 to 5.
shaalaa.com
Is there an error in this question or solution?
Chapter 10: String Handling - Exercises [Page 246]
