(a)
int ix;
for (ix = 0; ix != sz; ++ix) { /* ... */ }
//for (int ix = 0; ix != sz; ++ix) { /* ... */ }
// The loop variable is used outside `for` scope, thus should be defined outside.
if (ix != sz)
// ...
(b)
int ix;
//for (ix != sz; ++ix) { /* ... */ }
// When the initialization is unnecessary, a null statement should be used.
for (; ix != sz; ++ix) { /* ... */ }
(c)
for (int ix = 0; ix != sz; ++ix, ++ sz) { /* ... */ }
// The loop will never end.
for (int ix = 0; ix != sz; ++ix) { /* ... */ }