On this page:
If You Must Learn C
7.6

If You Must Learn C


(a flânerie by Prabhakar Ragde)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please do not post exercise solutions to any public forum or publicly-accessible software repository.

    1 Getting started

      1.1 Prospective Audience

      1.2 Software

      1.3 Command-line environments

        1.3.1 Macs

        1.3.2 Linux machines

        1.3.3 Cygwin

        1.3.4 Other choices

      1.4 Text editors

        1.4.1 DrRacket

        1.4.2 Nano/Pico

        1.4.3 Vim

        1.4.4 Emacs

      1.5 C compiler

      1.6 Optional textbooks

        1.6.1 Reading the King book in IYMLC order

    2 Introduction to C

      2.1 Basics

      2.2 Types

      2.3 Separate compilation

      2.4 Iteration

      2.5 The computational model

      2.6 Idiomatic use of loops

      2.7 Running time analysis of C programs

      2.8 Testing C programs

      2.9 C compile errors

      2.10 Introductory Exercises

    3 Pointers

      3.1 Structures in C

      3.2 Pointers in C

      3.3 The NULL value

      3.4 Heap allocation in C

      3.5 List Exercises

      3.6 Queues

      3.7 Arrays

      3.8 Dynamic allocation of arrays

    4 Intermediate C

      4.1 Pointer arithmetic

      4.2 C strings

      4.3 Reading S-expressions in C

      4.4 Other representations of trees

      4.5 Algorithms using arrays

        4.5.1 Mergesort

        4.5.2 Binary search

      4.6 Enforcing abstraction

      4.7 Intermediate Exercises

      4.8 Acknowledgements