r/programminghumor • • Feb 11 '26

Array is syntax error

Post image
444 Upvotes

46 comments sorted by

View all comments

Show parent comment

2

u/realestLink Feb 12 '26

Pointer arithmetic in C will automatically do the sizeof math.

Assuming arr is a T[] then arr[5] is literally definitionally equal to *(arr + 5) in all contexts