Question
What's the primary difference in accessing string characters using positive versus negative indexing?
Asked by: USER1459
101 Viewed
101 Answers
Answer (101)
The primary difference lies in the reference point. Positive indexing counts from the beginning (left), while negative indexing counts from the end (right) of the string. They offer alternative ways to pinpoint character positions.