c-programming

    C Programming Course

    C Programming Tutorial — basics, functions, pointers, memory management, file handling, and systems programming.

    65
    Lessons
    11
    Modules
    0/65
    Completed
    Curriculum

    Enterprise learning path

    11 modules · 65 lessons

    Start Here

    0/2 complete
    1. 1
      C Programming Home
      Next up

      This C Programming track on TechLearningPRO walks you from writing your first printf through pointers, manual memory management, files, and low-level systems topics.

    2. 2
      C Introduction

      C is a procedural, compiled language.

    1 · Basics

    0/14 complete
    1. 3
      Setting Up C Development Environment

      A productive C setup needs three pieces: a compiler toolchain (GCC or Clang), an editor you are comfortable in, and a shell for build commands.

    2. 4
      Run C Program in Terminal

      The usual workflow is edit source in a file, invoke the compiler from a shell, then launch the binary it produces.

    3. 5
      Compilation Process

      The C compilation process transforms source code into an executable through preprocessing, compilation, assembly, and linking.

    4. 6
      Identifiers

      Identifiers are names for variables, functions, and types.

    5. 7
      Keywords

      Keywords are reserved words with special meaning — int, return, if, while, struct, etc.

    6. 8
      Input and Output

      Console I/O lives in stdio.h: formatted output with printf and formatted input with scanf.

    7. 9
      Variables

      Variables are named regions of memory with a fixed type.

    8. 10
      Data Types

      Types tell the compiler how to interpret bits — integers, characters, and floating-point forms each have rules for size, range, and printf/scanf specifiers.

    9. 11
      Quiz: Basics | Variables | Data Types

      Quiz: Basics | Variables | Data Types checks how well you can apply Valid vs invalid identifiers and Size of int and char on your system (and related ideas) in C.

    10. 12
      Operators

      Operators combine values — arithmetic for math, relational and logical for decisions, bitwise for flags, and compound assignment for updates in place.

    11. 13
      Quiz: Input and Output | Operators

      Quiz: Input and Output | Operators checks how well you can apply printf with multiple specifiers and scanf with & for integers (and related ideas) in C.

    12. 14
      Conditional Statements

      Branching chooses which block runs — chained if/else for ranges, switch when matching one integral value against many labels.

    13. 15
      Loops

      Loops rerun a block — for when you know the trip count, while when you only know the stop condition, do-while when the body must run at least once.

    14. 16
      Quiz: Conditional Statements and Loops

      Quiz: Conditional Statements and Loops checks how well you can apply if-else ladder for grade ranges and switch without break behavior (and related ideas) in C.

    2 · Functions

    0/7 complete
    1. 17
      Functions

      Functions package logic behind a name and parameter list so you can reuse behavior and keep main() readable.

    2. 18
      Parameter Passing Techniques

      Arguments are copied by default.

    3. 19
      Main Function

      The main function is the entry point of every C program.

    4. 20
      Recursion

      Recursion is when a function calls itself.

    5. 21
      Inline Function

      Inline Function builds on this idea: inline as a hint to embed bodies at call sites.

    6. 22
      Nested Functions

      Nested Functions builds on this idea: GCC nested definitions — non-standard but occasionally seen.

    7. 23
      Quiz: Functions

      Quiz: Functions checks how well you can apply Function prototype purpose and Return type void (and related ideas) in C.

    3 · Arrays and Strings

    0/5 complete
    1. 24
      Arrays in C

      An array holds multiple values of one type in a single, contiguous block of memory.

    2. 25
      Multidimensional Arrays

      A multidimensional array stores data in two or more dimensions — commonly 2D arrays for matrices and grids.

    3. 26
      Strings

      Text in C is a char array terminated by a zero byte.

    4. 27
      String Functions

      String functions from string.h — strlen, strcpy, strcat, strcmp, and safer variants strncpy, strncat.

    5. 28
      Quiz: Arrays | Strings

      Quiz: Arrays | Strings checks how well you can apply Index of first and last element and Null terminator in strings (and related ideas) in C.

    4 · Pointers

    0/5 complete
    1. 29
      Pointers

      A pointer variable records an address.

    2. 30
      Pointer Arithmetic

      Pointer arithmetic moves pointers by sizeof(type) — p+1 points to the next element in an array.

    3. 31
      Pointer to Pointer

      Pointer to Pointer builds on this idea: Double indirection for dynamic 2D data and argv.

    4. 32
      Function Pointers

      Function Pointers builds on this idea: Store call targets for callbacks and dispatch tables.

    5. 33
      Quiz: Pointers

      Quiz: Pointers checks how well you can apply Difference between & and * and Pointer arithmetic on int* (and related ideas) in C.

    5 · User Defined Data Types

    0/4 complete
    1. 34
      Structures

      A structure (struct) groups related variables of different types under one name — ideal for records like Student or Point.

    2. 35
      Unions

      A union shares one memory block among members — size equals largest member; only one member active at a time.

    3. 36
      Enumeration (enum)

      enum defines named integer constants — improves readability over raw numbers.

    4. 37
      Quiz: Structure & Union

      Quiz: Structure & Union checks how well you can apply Memory layout of struct and Union size equals largest member (and related ideas) in C.

    6 · Memory Management

    0/4 complete
    1. 38
      Program's Memory Layout

      A C program's memory layout includes text (code), data (globals), BSS (uninitialized globals), heap (dynamic), and stack (locals, calls).

    2. 39
      Dynamic Memory Allocation

      Dynamic memory allocation reserves memory at runtime on the heap using malloc, calloc, realloc, and releases it with free.

    3. 40
      Memory Leaks

      A memory leak occurs when heap memory is allocated but never freed — program loses access while memory stays reserved.

    4. 41
      Quiz: Memory Management

      Quiz: Memory Management checks how well you can apply Stack vs heap and When to use calloc vs malloc (and related ideas) in C.

    7 · File Handling

    0/6 complete
    1. 42
      Basics of File Handling

      File handling in C uses FILE pointers — fopen to open, fclose to close, and fprintf/fscanf or fread/fwrite for data.

    2. 43
      Read a File

      Read a File builds on this idea: Line and block reads from disk.

    3. 44
      Read/Write Structure From/to a File

      Read/Write Structure From/to a File builds on this idea: Binary persistence with fread/fwrite.

    4. 45
      EOF, getc() and feof()

      EOF, getc() and feof() builds on this idea: Detecting end-of-file while reading char by char.

    5. 46
      Delete a File

      Delete a File builds on this idea: remove() and filesystem cleanup.

    6. 47
      Quiz: File Handling

      Quiz: File Handling checks how well you can apply fopen modes r and w and feof vs ferror (and related ideas) in C.

    8 · Error Handling

    0/4 complete
    1. 48
      Error Handling

      Error Handling builds on this idea: Return codes, errno, perror, strerror.

    2. 49
      Exception Handling Using goto

      Exception Handling Using goto builds on this idea: Centralized cleanup without C++ exceptions.

    3. 50
      File Error Handling

      File Error Handling builds on this idea: Guard every fopen and check ferror/feof.

    4. 51
      Divide by Zero Exception

      Divide by Zero Exception builds on this idea: Validate divisors — C does not catch this for you.

    9 · Miscellaneous Concepts

    0/8 complete
    1. 52
      Preprocessors

      The preprocessor runs before compilation — handles #include, #define, #ifdef, and conditional compilation.

    2. 53
      Macros

      Macros are preprocessor text replacements — object-like (#define MAX 100) and function-like (#define SQR(x) ((x)*(x))).

    3. 54
      Quiz: Preprocessors and Macros

      Quiz: Preprocessors and Macros checks how well you can apply Macro vs const variable and Include guard pattern (and related ideas) in C.

    4. 55
      Header Files

      Header Files builds on this idea: Split interfaces (.h) from implementations (.c).

    5. 56
      Date and Time

      Date and Time builds on this idea: time.h utilities for clocks and formatting.

    6. 57
      Linkage

      Linkage builds on this idea: Which translation units may see a symbol.

    7. 58
      Storage Classes

      Storage classes — auto (local default), register (hint), static (persistent/block scope), extern (global linkage).

    8. 59
      Quiz: Storage Classes

      Quiz: Storage Classes checks how well you can apply static local retention and extern linkage (and related ideas) in C.

    10 · Advanced Concepts

    0/6 complete
    1. 60
      Variadic Functions

      Variadic Functions builds on this idea: Variable argument lists via stdarg.h.

    2. 61
      Input-Output System Calls

      Input-Output System Calls builds on this idea: Unix read/write on file descriptors.

    3. 62
      Signals

      Signals builds on this idea: Asynchronous notifications such as SIGINT.

    4. 63
      Socket Programming

      Socket Programming builds on this idea: Network endpoints with the BSD socket API.

    5. 64
      _Generics Keyword

      _Generics Keyword builds on this idea: C11 _Generic for type-selected macros.

    6. 65
      Multithreading

      Multithreading in C often uses POSIX pthreads — create threads, share address space, synchronize with mutexes.