C Programming For Dummies, 2nd Edition

Book description

Get an A grade in C

As with any major language, mastery of C can take you to some very interesting new places. Almost 50 years after it first appeared, it's still the world's most popular programming language and is used as the basis of global industry's core systems, including operating systems, high-performance graphics applications, and microcontrollers. This means that fluent C users are in big demand at the sharp end in cutting-edge industries—such as gaming, app development, telecommunications, engineering, and even animation—to translate innovative ideas into a smoothly functioning reality.

To help you get to where you want to go with C, this 2nd edition of C Programming For Dummies covers everything you need to begin writing programs, guiding you logically through the development cycle: from initial design and testing to deployment and live iteration. By the end you'll be au fait with the do's and don'ts of good clean writing and easily able to produce the basic—and not-so-basic—building blocks of an elegant and efficient source code.

  • Write and compile source code
  • Link code to create the executable program
  • Debug and optimize your code
  • Avoid common mistakes

Whatever your destination: tech industry, start-up, or just developing for pleasure at home, this easy-to-follow, informative, and entertaining guide to the C programming language is the fastest and friendliest way to get there!

Table of contents

  1. Cover
  2. Title Page
  3. Copyright Page
  4. Introduction
    1. Why the C Language?
    2. The C Programming For Dummies Approach
    3. How This Book Works
    4. Icons Used in This Book
    5. Parting Thoughts
  5. Part 1: The ABs of C
    1. Chapter 1: A Quick Start for the Impatient
      1. What You Need to Program
      2. Command Prompt Programming
      3. IDE Programming
      4. Your First Program
    2. Chapter 2: The Programming Thing
      1. The History of Programming
      2. The Programming Process
    3. Chapter 3: Anatomy of C
      1. Parts of the C Language
      2. Behold the Typical C Program
  6. Part 2: C Programming 101
    1. Chapter 4: Trials and Errors
      1. Display Stuff on the Screen
      2. More Text Output Nonsense
    2. Chapter 5: Values and Simple Math
      1. A Venue for Various Values
      2. The Computer Does the Math
    3. Chapter 6: A Place to Put Stuff
      1. Values That Vary
      2. Variable Madness!
      3. Constants Always the Same
    4. Chapter 7: Input and Output
      1. Character I/O
      2. Text I/O, but Mostly I
    5. Chapter 8: Decision Making
      1. What If?
      2. Multiple Decisions
      3. Multiple Comparisons with Logic
      4. The Old Switch Case Trick
      5. The Weird ?: Decision Thing
    6. Chapter 9: Loops, Loops, Loops
      1. A Little Déjà Vu
      2. The Thrill of for Loops
      3. The Joy of the while Loop
      4. Loopy Stuff
    7. Chapter 10: Fun with Functions
      1. Anatomy of a Function
      2. Functions and Variables
      3. Constants of the Global Kind
  7. Part 3: Build Upon What You Know
    1. Chapter 11: The Unavoidable Math Chapter
      1. Math Operators from Beyond Infinity
      2. Math Function Mania
      3. It’s Totally Random
      4. The Holy Order of Precedence
    2. Chapter 12: Give Me Arrays
      1. Behold the Array
      2. Multidimensional Arrays
      3. Arrays and Functions
    3. Chapter 13: Fun with Text
      1. Character Manipulation Functions
      2. String Functions Galore
      3. Fun with printf() Formatting
      4. Gently Down the Stream
    4. Chapter 14: Structures, the Multivariable
      1. Hello, Structure
      2. Weird Structure Concepts
    5. Chapter 15: Life at the Command Prompt
      1. Conjure a Terminal Window
      2. Arguments for the main() Function
      3. Time to Bail
    6. Chapter 16: Variable Nonsense
      1. Variable Control
      2. Variables, Variables Everywhere
    7. Chapter 17: Binary Mania
      1. Binary Basics
      2. Bit Manipulation
      3. The Joy of Hex
  8. Part 4: The Advanced Part
    1. Chapter 18: Introduction to Pointers
      1. The Biggest Problem with Pointers
      2. Sizing Up Variable Storage
      3. The Hideously Complex Topic of Pointers
    2. Chapter 19: Deep into Pointer Land
      1. Pointers and Arrays
      2. Strings Are Pointer-Things
      3. Pointers in Functions
    3. Chapter 20: Memory Chunks and Linked Lists
      1. Give Me Memory!
      2. Lists That Link
    4. Chapter 21: It’s About Time
      1. What Time Is It?
      2. Time to Program
  9. Part 5: And the Rest of It
    1. Chapter 22: Permanent Storage Functions
      1. Sequential File Access
      2. Random File Access
    2. Chapter 23: File Management
      1. Directory Madness
      2. Fun with Files
    3. Chapter 24: Beyond Mere Mortal Projects
      1. The Multi-Module Monster
      2. Other Libraries to Link
    4. Chapter 25: Out, Bugs!
      1. Simple Tricks to Resolve Problems
      2. The Debugger
      3. Improved Error Messages
  10. Part 6: The Part of Tens
    1. Chapter 26: Ten Common Boo-Boos
      1. Conditional Foul-Ups
      2. == v. =
      3. Dangerous Loop Semicolons
      4. Commas in for Loops
      5. Missing break in a switch Structure
      6. Missing Parentheses and Curly Brackets
      7. Don’t Ignore a Warning
      8. Endless Loops
      9. scanf() Blunders
      10. Streaming Input Restrictions
    2. Chapter 27: Ten Reminders and Suggestions
      1. Maintain Good Posture
      2. Use Creative Names
      3. Write a Function
      4. Work on Your Code a Little Bit at a Time
      5. Break Apart Larger Projects into Several Modules
      6. Know What a Pointer Is
      7. Add Whitespace before Condensing
      8. Know When if-else Becomes switch-case
      9. Remember Assignment Operators
      10. When You Get Stuck, Read Your Code Out Loud
  11. Part 7: Appendices
    1. Appendix A: ASCII Codes
    2. Appendix B: Keywords
    3. Appendix C: Operators
    4. Appendix D: Data Types
    5. Appendix E: Escape Sequences
    6. Appendix F: Conversion Characters
    7. Appendix G: Order of Precedence
  12. Index
  13. About the Author
  14. Connect with Dummies
  15. End User License Agreement

Product information

  • Title: C Programming For Dummies, 2nd Edition
  • Author(s): Dan Gookin
  • Release date: October 2020
  • Publisher(s): For Dummies
  • ISBN: 9781119740247