What's the primary difference in accessing string characters using positive versus negative indexing?

Responsive Ad Header

Question

Grade: Education Subject: Ddos
What's the primary difference in accessing string characters using positive versus negative indexing?
Asked by:
101 Viewed 101 Answers

Answer (101)

Best Answer
(231)
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.