Reading history
C Programming

C Programming Tutorial

A complete C course: from your first program to pointers, memory, files and system programming, with tested code in every lesson.

Start learning 120 lessons

Lessons

  1. C Programming Tutorial: Learn C Step by Step
  2. C Language Introduction: What C Is and Why Learn It
  3. C Compilation Process: Preprocess, Compile, Assemble, Link
  4. Identifiers in C: Naming Rules and Conventions
  5. Keywords in C: Full List With Meanings
  6. Input and Output in C: printf, scanf and More
  7. Variables in C: Declaration, Initialization and Scope
  8. Scope Rules in C: Block, File and Function Scope
  9. Constants in C: const, #define and enum
  10. Data Types in C: int, float, char, double and More
  11. Literals in C: Integer, Floating, Character and String
  12. User-Defined Literals in C++ (operator””)
  13. Octal Literals in C: Why 010 Equals 8
  14. Compound Literals in C: Unnamed Arrays and Structs
  15. Character Literals in C vs C++: Why sizeof(‘a’) Differs
  16. Type Conversion in C: Implicit and Explicit Casting
  17. Ranges of Data Types in C: Min and Max Values
  18. Operators in C: Arithmetic, Relational, Logical and Bitwise
  19. Operator Precedence and Associativity in C (Table)
  20. Decision Making in C: if, else, else if and switch
  21. Loops in C: for, while and do-while
  22. Functions in C: Syntax, Parameters and Return Values
  23. Function Declaration vs Definition in C
  24. Function Call Stack in C: How Calls Work
  25. Parameter Passing in C: Pass by Value and by Pointer
  26. The main() Function in C: Return Values and Arguments
  27. Recursion in C: How Recursive Functions Work
  28. Inline Functions in C: Syntax, Rules and Examples
  29. Nested Functions in C: GCC Extension and Portable Options
  30. Arrays in C: Declare, Initialise and Use Arrays
  31. Traverse an Array in Reverse Order in C
  32. Search an Element in an Array in C: Linear and Binary
  33. Count Elements Smaller Than X in an Array in C
  34. Sum of Array Elements in C: Loop, Pointer and Recursion
  35. First Repeating Element in an Array in C
  36. Count Zeros in a Sorted Binary Array in C
  37. Find the Largest Element in an Array in C
  38. Pointers and Arrays in C: How They Are Related
  39. Pass a 3D Array to a Function in C
  40. Multidimensional Arrays in C: 2D and 3D Arrays
  41. Find the Length of an Array in C With sizeof
  42. Strings in C: Declaration, Input and Manipulation
  43. C String Functions: strlen, strcpy, strcmp and More
  44. Pointers in C: A Beginner-Friendly Guide
  45. Pointer vs Array in C: Key Differences
  46. Pointer Arithmetic in C With Examples
  47. Pointer to Pointer (Double Pointer) in C
  48. Function Pointers in C with Examples
  49. Structures in C: struct Declaration, Access and Examples
  50. Unions in C: Shared Memory for Members
  51. Enumeration (enum) in C with Examples
  52. Memory Layout of a C Program: Text, Data, BSS, Heap, Stack
  53. Dynamic Memory in C: malloc, calloc, realloc and free
  54. Read a File in C: fgetc, fgets and fread
  55. Write and Read a Structure to a File in C
  56. EOF, getc() and feof() in C Explained
  57. Delete a File in C Using remove()
  58. Error Handling in C: errno, perror and Return Codes
  59. Using goto for Error Cleanup in C
  60. Error Handling in C File Operations
  61. Handle Divide by Zero in C
  62. C Preprocessor: #define, #include, #if and Macros
  63. Macros in C: Object-Like, Function-Like and More
  64. Header Files in C: Creating and Using .h Files
  65. Create Your Own Static and Shared Library in C
  66. time.h in C: Dates, Times and Measuring Run Time
  67. Internal vs External Linkage in C: static and extern
  68. Storage Classes in C: auto, static, extern, register
  69. Variadic Functions in C: stdarg.h and Variable Arguments
  70. Input/Output System Calls in C: open, read, write, close
  71. Signals in C: Handling SIGINT, SIGTERM and More
  72. Socket Programming in C: TCP Client and Server
  73. IP Address vs Port Number: What Is the Difference?
  74. _Generic in C11: Type-Generic Macros
  75. Multithreading in C With POSIX Threads (pthreads)
  76. Careers in C Programming: Jobs, Skills and Roadmap
  77. C Interview Questions and Answers (Beginner to Advanced)
  78. C Fundamentals Practice Problems for Beginners
  79. C Functions Practice Problems with Solutions
  80. C Practice Problems: Arrays, Strings, Structs and Pointers
  81. Bitwise Operators in C (AND, OR, XOR, NOT, Shifts) with Examples
  82. typedef in C: Aliases for Structs, Arrays and Function Pointers
  83. const and volatile in C: Const Pointers and Parameters
  84. Command Line Arguments in C: argc and argv
  85. void Pointer, NULL Pointer, Dangling and Wild Pointers in C
  86. qsort and bsearch in C: Sorting Arrays, Strings and Structs
  87. String to Number Conversion in C: atoi vs strtol, sscanf, snprintf
  88. Bit Fields in C: Packing Struct Members into Bits
  89. Structure Padding and Alignment in C (sizeof, offsetof, pack)
  90. C Project: Student Records System with Structs and Files
  91. Linked List in C: Insert, Delete, Search and Reverse
  92. Stack and Queue Implementation in C
  93. Sorting Algorithms in C: Bubble, Insertion, Merge and Quick Sort
  94. Binary Search in C: Iterative, Recursive and Bounds
  95. sizeof Operator in C with Examples
  96. Reading Input Safely in C: fgets vs scanf
  97. snprintf, sprintf and sscanf in C
  98. strtok in C: Split a String into Tokens
  99. math.h Functions in C: pow, sqrt, round and More
  100. Undefined Behaviour in C: Common Cases and Safe Code
  101. Dynamic Arrays in C With realloc
  102. Dynamic 2D Arrays in C: Three Ways to Allocate
  103. Matrix Operations in C: Add, Multiply, Transpose, Determinant
  104. Writing Your Own String Functions in C
  105. Hash Table in C: Chaining and Open Addressing
  106. Binary Search Tree in C: Insert, Search, Delete
  107. Flexible Array Members and Variable Length Arrays in C
  108. Random Numbers in C: rand, srand, Ranges and Shuffling
  109. assert and Debugging Techniques in C
  110. C Project: Word Frequency Counter
  111. Fixed-Width Integers in C: stdint.h and inttypes.h
  112. C printf Format Specifiers
  113. C memcpy, memmove and memset
  114. C Binary Files: fseek, ftell and Random Access
  115. Endianness and Byte Order in C
  116. The volatile and restrict Keywords in C
  117. Generic Programming in C With void Pointers
  118. Circular Buffer (Ring Buffer) in C
  119. Binary Heap and Priority Queue in C
  120. C Project: Inventory Manager