Skip to main content
Post Migrated Here from stackoverflow.com (revisions)
Post Made Community Wiki
Source Link
AndersK
  • 1k
  • 7
  • 9

Because there is a strong correlation between arrays and pointers in C

char* p = "hello"; char q[] = "hello"; assert(p[1] == q[1]); assert(*p == *q) 

*p is the same as *(p + 0)

having a starting index of 1 will give you headache later