Thursday, July 9, 2009

Where can I get complete help for C file input output?

or C language in general and specifically on file i/o

Where can I get complete help for C file input output?
Hiya cool -- See "22 JAN added" below.





A good C reference is needed, so why not use something free online, I think? This is pretty good, found at: http://www.imada.sdu.dk/~svalle/courses/...





"Your program must open a file before it can access it. This is done using the fopen function, which returns the required file pointer. If the file cannot be opened for any reason then the value NULL will be returned. You will usually use fopen as follows





if ((output_file = fopen("output_file", "w")) == NULL)


fprintf(stderr, "Cannot open %s\n", "output_file");





fopen takes two arguments, both are strings, the first is the name of the file to be opened, the second is an access character...





[end sample]





A "good" C reference has examples, like this one above. A long time ago I bought the Power C compiler by Mix [probably defunct now]. The manual made a big diff in my programming, with all the samples and stuff.





Having a good C reference will likely make all the difference for u, too.





The 1st link (below) has the whole manual for the above sample.


The 2nd link will help you find others...maybe even better!


-----


22 JAN added:


3rd link--to Mix Power C compiler still available! Unbelieveable, this is the C reference tool that I've used (almost exclusively) for almost 15 years. I can't recommend it enough. The C compiler works, it's OK. But if you're just using Turbo C or something, stick with that. At $19.95 (just the The Power C Compiler which includes the reference BOOK--the real gem--) it's hard to go wrong. I know it might seem too cheap to be good, but that's a fallacy. I've invested almost $1000.00 in C programming books...but the Power C manual has gotten the most use, unequivocably...I've re-glued the pages back in the book more than once...





best wishes,





_g

verbena

No comments:

Post a Comment