Input and Output in C — printf, scanf, and Safe I/O Patterns
scanf(“%s”) wrote 31 bytes into an 8-byte buffer. A guide to C I/O that shows the unsafe patterns failing rather than just naming them.
C is one of the most important programming languages ever created. Developed in the early 1970s, it remains the foundation of operating systems, embedded systems, compilers, and high-performance software used across the world today. Learning C gives you a deep understanding of how computers actually work — memory, pointers, data structures, and low-level system operations that higher-level languages hide from you.
At MYCPLUS we have been publishing C programming tutorials, source code examples, and practical guides since 2004. Whether you are writing your first Hello World program or working through complex data structure implementations, this section covers every stage of the C learning journey. You will find step-by-step tutorials, working source code you can compile and run immediately, and clear explanations of concepts that are often poorly explained elsewhere.
C is the language that powers Linux, Windows internals, embedded microcontrollers, game engines, and countless performance-critical applications. If you want to become a serious systems programmer, understand how memory works, or simply build a rock-solid foundation before moving to C++, Java or Python — start here.
Why MYCPLUS Trusted by C programmers since 2004 — every tutorial includes working source code you can compile, run and learn from immediately.
scanf(“%s”) wrote 31 bytes into an 8-byte buffer. A guide to C I/O that shows the unsafe patterns failing rather than just naming them.
String library in C, <cstring> or <string.h> provides several functions to manipulate C strings and arrays. The strcmp() function compares
The same four members reordered went from 24 bytes to 16. A guide to struct syntax, what the compiler does with your layout, and why memcmp lies.
Arithmetic to bitwise, with the complete precedence table and the conversion rules that quietly change your operands before the operation runs.
int is not always 32 bits and long is not always 64. A measured reference to C types, their real sizes, and the conversions that catch people.
We measured rand() over 20 million samples. When modulo bias matters, when it does not, and why C++ random is both safer and faster.
Graphics programming in C starts with graphics.h and initgraph(). Learn the BGI functions, run them on modern systems, then step up to SDL2 and raylib.
File handling lets your C programs store and read data on disk. This complete guide covers every core function, file modes, binary files, and error handling — with tested examples.
A double pointer in C stores the address of another pointer. See the memory diagram, the key use cases, and tested examples of int** and char**.
A complete Snake game in C with tested, cross-platform source code, a section-by-section walkthrough, and modification ideas from pause to levels.
math.h declares C’s standard math functions: sqrt, pow, sin, log, floor and more. A complete reference with compiled examples, C99 additions and fixes.
Functions are the building blocks of every C program. This complete guide covers declaration, call by value vs reference, recursion, and function pointers — with tested examples.