News for hackers. Stuff that matters.
Re:Fixing C by jandrese on Tuesday April 12, 2016 @03:47PM (#11482928)
That's because C tosses out all of that array state information at the drop of a hat once you start passing them around to functions.

Worse, it's an easy way to get burned on the sizeof() function, especially if you at some point refactor the code and put that chunk in a function separate from the original declaration.

This is why C programmers get gunshy about relying on that information and instead just treat strings like pointers all of the time.

Re:Fixing C by mfukar on Thursday April 21, 2016 @12:10PM (#11543213)
> This is why C programmers get gunshy about relying on that information and instead just treat strings like pointers all of the time.

Good programmers do nothing of the sort.