Question

What are the valid indexes for the string Battle of Algiers? 1 through 17 - Othrough 16 1 through 17 and 1 through 17 -1 thro
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer :

In general valid index for string constant starts from 0 till length-1 of the string.Then the answer will be 0 through 16.

Indexing of string constant start with 0 and ends with length-1 of the string. Any thing between double quotes or single quotes is string constant. for example "ABC DEF" here we have 5 character and 1 white space in string constant and its indexing will be 0 through 6.

In python we have negative indexing that means negative values can be used to index the string. If your question is regarding the python programming language then the answer will be -1 through -17 and 0 through 16.

Note: please let me know if you have any doubt.

Add a comment
Know the answer?
Add Answer to:
What are the valid indexes for the string Battle of Algiers? 1 through 17 - Othrough...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT