Please, I don't want to be unfriendly, but I have Just ONE question... are you sure that you are using gcc under linux??.. ;-) I'm not a moderator at all anyway this is not a C forum.. this is for linux and u are making some c-only questions... I think you'd better read the C FAQ before (for example at url:
http://www.eskimo.com/~scs/C-faq/top.html ) And/Or buy the K&R 2nd edition... And/Or read some newsgroups' archives like the one from comp.lang.c
Please, forgive me Moderator.
For the last time (about this argument):
1) Under linux? None. Under some other os? CR (\r)+LF(\n) = LF(\n) (reading) and LF=CR+LF (writing). \x1a = means EOF (but usually u can keep on reading after this kind of EOF).
2) READ AT LEAST K&R ... C Programming Language, it DOES worth the reading. '\0' is used as a "flag" to terminate arrays (null-terminated strings are only arrays).
3) feof is set only after the first reading that reaches the end of file condition... try this kind of code:
void function()
{
FILE *fp=fopen("yourfile","rb"); /*just to be sure*/
int c;
while((c=fgetc(fp))!= EOF) {
printf("%c", c);
}
fclose(fp);
}
4) U don't .. and u have to tell WERE you want to print it..
On a text only-terminal, in a X-window application, etc. If u are using text (under linux) I suppose that you have to understand something like ncurses. BTW under c (use #include <ctype.h> if i'm not wrong) there is a function called isprint(c) which tells you what is printable and what is not printable..
Addio (for this argument).