CBSE Class 11 Computer Science
Question 74 of 91
String Manipulation — Question 19
Back to all questions 19
Question Question 9
What is the output produced?
(i) >>> "whenever" .find("never")
(ii) >>> "whenever" .find("what")
Answer
(i) 3
The starting index of substring "never" in "whenever" is 3.
(ii) -1
Substring "what" is not present in "whenever".