logo

Snefru: Learning Programming with C

  • Snefru: Learning Programming with C

Preface

  • What about programming?
  • Principles of using this textbook

Book Chapters

  • 1. Introduction to Programming Computers
    • 1.1. The Basic Structure of Computers
    • 1.2. Binary representation in memory
    • 1.3. Development Cycle
    • 1.4. Write Simple C Programs
  • 2. Data representation and operations
    • 2.1. Double data type for real numbers
    • 2.2. Data types and representation
    • 2.3. Operations
    • 2.4. Math library
    • 2.5. Random numbers
    • 2.6. Exercises
  • 3. Decision-Making Statements
    • 3.1. If-statements
    • 3.2. Multiple Conditions
    • 3.3. Nested-if statements
    • 3.4. Exercises
  • 4. Repetition
    • 4.1. While Loop
    • 4.2. Do-while loop
    • 4.3. For loops
    • 4.4. Nested loops
    • 4.5. Debugging for loops
    • 4.6. Exercises
  • 5. Functions
    • 5.1. Functions
    • 5.2. Communicate from a function
    • 5.3. Variable scope
    • 5.4. Pass more values to a function
    • 5.5. Exercises
  • 6. Pointers
    • 6.1. Why do we need pointers?
    • 6.2. What are pointers?
    • 6.3. How to use pointers to communicate more with functions?
    • 6.4. Rules defining scope of variables
    • 6.5. Goldbach conjecture
    • 6.6. Exercises
  • 7. Arrays
    • 7.1. Why and how to use arrays?
    • 7.2. What are arrays, and how are they stored?
    • 7.3. How do we pass an array to a function?
    • 7.4. Exercises
  • 8. Dynamic Memory Allocation
    • 8.1. What is dynamic memory allocation?
    • 8.2. Exercises
  • 9. Multi-dimensional Arrays
    • 9.1. Why and how to use 2D arrays?
    • 9.2. How do we pass a 2D array to a function?
    • 9.3. Dynamic Memory Allocation of 2D Arrays
    • 9.4. Exercises
  • 10. Strings
    • 10.1. What are strings?
    • 10.2. Input/Output Strings
    • 10.3. String Functions
    • 10.4. Array of Strings
    • 10.5. Exercises
  • 11. Recursion
    • 11.1. Recursive functions by definition
    • 11.2. Recursion in Patterns
    • 11.3. Recursion in arrays
    • 11.4. Exercises
  • 12. Data Structures
    • 12.1. What are data structures?
    • 12.2. Pointers to Data Structures
    • 12.3. Exercises
  • 13. Linked Lists
    • 13.1. Why linked lists?
    • 13.2. Form a linked list
    • 13.3. Insert nodes into a linked list
    • 13.4. Delete nodes in a linked list
    • 13.5. Exercises
  • 14. Sorting
    • 14.1. Insertion Sort
    • 14.2. Selection Sort
    • 14.3. Bubble sort
    • 14.4. Exercises
  • 15. Searching
    • 15.1. Linear/Sequential Search
    • 15.2. Binary Search
    • 15.3. Exercises

Appendix: Additional information

  • Appendix: Additional Resources
  • Set up Visual Studio Code
  • More Extensions in VS Code
  • Coding style
  • Debugging
  • Basic UNIX Commands
Powered by Jupyter Book
  • repository
  • open issue
  • .md
Contents

Contents

previous

Basic UNIX Commands

By Salma Emara et al.
© Copyright 2022–2025.