Any suggestions on the best online tutorial/ebook/printed book regarding C libraries and latest c std? I would like to get more coverage on FILE I/O s
Thanks in advance

Dani AI

Generated

A short, up-to-date follow‑up for (and thanks to and for the original pointers): a few compact, durable resources and practical tips for C FILE I/O that are still relevant years later.

Recommended reading (quick): K&R (The C Programming Language, 2nd ed.) for learning the basics; Harbison & Steele (C: A Reference Manual) for a thorough library and language reference; Plauger’s The Standard C Library for implementation detail; Stevens’ Advanced Programming in the UNIX Environment for POSIX I/O. For fast, current online lookup of every stdio function (which standard added it, example usage, gotchas), use cppreference’s C I/O pages. (en.cppreference.com)

Standards note: the language and library evolved since 2010 — the published revision after C17 is C23 (ISO/IEC 9899:2024). For normative behavior (what is guaranteed vs implementation-defined) consult the standard or an annotated reference when behavior matters. (en.cppreference.com)

Practical FILE I/O checklist and gotchas:

  • Start with stdio: fopen/fclose, fread/fwrite, formatted I/O and fseek/ftell. Read the function pages for exact mode strings and platform notes; e.g., the "b" (binary) mode is meaningful on Windows and typically ignored on POSIX. (en.cppreference.com)
  • fread/fwrite return counts — they don’t tell EOF vs error; use feof() and ferror() for diagnostics. (en.cppreference.com)
  • Large files: prefer fseeko/ftello or build with _FILE_OFFSET_BITS=64 to get 64-bit offsets on systems where long is 32 bits. (sourceware.org)
  • When you need unbuffered control, special flags or atomic opens, use POSIX open/read/write (and the system man pages) rather than stdio. (man7.org)

If the task is to parse a structured format (XLS/XLSX) rather than plain files, use a dedicated library (or convert to CSV) — raw fread on a binary office file won’t be enough. These pointers should help bridge the short tutorials and the formal standard-level details.

Recommended Answers

All 7 Replies

Read a good book on it, but it might be a little too expensive for just file I/O. If you're looking for a reference, check the Dinkumware link in my signature.

Read a good book on it, but it might be a little too expensive for just file I/O. If you're looking for a reference, check the Dinkumware link in my signature.

Thank you...
Any other suggestions..?

Read a good book on it, but it might be a little too expensive for just file I/O. If you're looking for a reference, check the Dinkumware link in my signature.

No more suggestions? So marking as solved. Thanks to all

Some other good books are the ones in O'Reilly's In a Nutshell series. This is the one on C. I haven't read it yet, but I plan to change this pretty soon.

how do i read a file in xls using c program

now i am using linux ubuntu. i got a small problem. the error msg got display
this word is
verifying DMI pool data.......
boot cd
unknow file system
grep resuce>
how do mount the file system?

how do i fsck the file system.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.