ICSE Class 10 Computer Applications
Question 10 of 10
Solved 2022 Semester 2 Question Paper ICSE Class 10 Computer Applications — Question 10
Back to all questionsLuck
Reason — The substring() method returns a substring beginning from the startindex and extending to the character at index endIndex - 1. Since a string index begins at 0, the character at startindex (0) is 'L' and the character at the endIndex (4-1 = 3) is 'k'. Thus, "Luck" is extracted and printed on the screen.