CBSE Class 11 Computer Science Question 48 of 91

String Manipulation — Question 8

Back to all questions
8
Question

Question 8

What happens when from a string slice you skip the start and/or end values of the slice?

Answer

If start value is skipped, it is assumed as 0 i.e. the slice begins from the start of the string.

If end value is skipped, it is assumed as the last index of the string i.e. the slice extends till the end of the string.

Answer