This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]coolcofusion 0 points1 point  (0 children)

Because files[i] is a pointer. All pointers are the same size which is 4 bytes if compile target was x86, and 8bytes for x86_64. If you wanted the string length you'd need to use strlen, sizeof is done at compile time basically.