English

What will be the output of the following code? str1 = "Chennai Schools" str1[7] = "-"

Advertisements

Question

What will be the output of the following code?

str1 = "Chennai Schools"
str1[7] = "-"

Options

  • Chennai-Schools

  • Chenna-School

  • Type error

  • Chennai

MCQ
Advertisements

Solution

Type error

shaalaa.com
Programs Using Strings
  Is there an error in this question or solution?
Chapter 8: Strings and String manipulation - Evaluation [Page 129]
Advertisements
Share
Notifications



      Forgot password?
Use app×