i have been having problems trying to read from files using c programming. i succeeded in reading from .txt files and playing with the contents but i can't read al the contents of any .jpg or .doc file. please how do i go about this. i hve not tried other extensions but i am sure they won't work if .doc doesn't work for me.

Probably the '.txt' that you are reading is an ASCII file. .jpg and (I think) .doc are binary files. The difference is that ASCII files generally store readable text data, and binary files generally contain non-text data.