What is file handling in C?
Learn how C reads and writes files with fopen, fgets, fprintf, fread, fwrite and fclose, including open modes, seeking and the error checks you must not skip.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Learn how C reads and writes files with fopen, fgets, fprintf, fread, fwrite and fclose, including open modes, seeking and the error checks you must not skip.
Understand C streams: the standard streams stdin, stdout and stderr, file streams from fopen, text versus binary mode, and buffering, with examples.
Dynamic memory allocation in C uses malloc, calloc, realloc and free to manage heap memory. Learn safe patterns, common bugs and how to detect leaks.
C has no built-in constructors or destructors, so you write init and destroy functions and call them yourself. See the idiomatic patterns and compiler extensions.
C has no Standard Template Library because it lacks templates. Learn what C offers instead, such as qsort, realloc-based arrays and libraries like GLib.
C has no exceptions, so errors travel through return values and errno. Learn the idiomatic patterns: status codes, goto cleanup and setjmp with longjmp.
C does not support templates, but you can write generic code with macros, _Generic, void pointers and macro-generated functions. See each option with examples.
C has no function overloading because each function needs a unique name. See the compile error, and the workarounds: distinct names, _Generic macros and type tags.
C has structs but no classes. See how struct differs from a class, and how to build class-like designs with functions, opaque types and function pointers.
A practical comparison of C and Java covering compilation, memory management, pointers, types, error handling, concurrency and when to choose each.
C has no built-in OOP, but embedded structs and vtables give you inheritance and run-time polymorphism. Learn the pattern with complete, tested examples.
C has no operator overloading, but named functions, C11 _Generic selection and the built-in complex type give you practical alternatives.
Variables hold changeable values in C, constants do not. Compare const, #define, enum and C23 constexpr with working examples.
A concise guide to C program structure, variables, core data types and control flow, with compilable examples for C17 and C23.
C was created by Dennis Ritchie in the early 1970s and became the language of Unix. Follow its history from B to C23 and see where it is used today.
A step-by-step guide to hosting Next.js on an Ubuntu VPS with Nginx, PM2, free HTTPS and automated deployments through GitHub Actions.
Learn when to use type() and isinstance() in Python, how to check several types, use abstract base classes and why type hints are not enforced.
dict() builds a Python dictionary from keyword arguments, pairs, zip() or another mapping. See every form, copying, merging with the | operator and pitfalls.
Select elements with querySelector, change content, classes and attributes, create and remove nodes, and handle events safely with modern DOM APIs.
The DOM represents the document you can modify, while the BOM gives access to the browser itself. Learn the objects, the hierarchy and modern best practice.