Nice of you to leave something to the OP. :)
Type: Posts; User: oogabooga
Nice of you to leave something to the OP. :)
Adding one more thing in the same vein as anduril's critique, you shouldn't type actual tabs into strings (which I assume you did in the strtok format strings). Use \t instead.
Please post code that actually compiles.
Remember to use a high warning level. For gcc:
gcc -W -Wall yourprog.c
I wouldn't be so sure! :)
Run it in a debugger:
gcc -g -W -Wall yourprog.c...