Code:
for( j = 0,; lastch != ','; j++, i++)
Just reread the line carefully.

Quzah.