Skip to Content
Head First C
book

Head First C

by David Griffiths, Dawn Griffiths
April 2012
Intermediate to advanced
632 pages
13h 51m
English
O'Reilly Media, Inc.
Content preview from Head First C

Appendix B. C Topics: Revision roundup

image with no caption

Ever wished all those great C facts were in one place?

This is a roundup of all the C topics and principles we’ve covered in the book. Take a look at them, and see if you can remember them all. Each fact has the chapter it came from alongside it, so it’s easy for you to refer back if you need a reminder. You might even want to cut these pages out and tape them to your wall.

Basics

Chapter 1

Simple statements are commands.

Chapter 1

if statements run code if something is true.

Chapter 1

You can combine conditions together with && and ||.

Chapter 1

#include includes external code for things like input and output.

Chapter 1

Block statements are surrounded by { and }.

Chapter 1

switch statements efficiently check for multiple values of a variable.

Chapter 1

Every program needs a main function.

Chapter 1

Your source files should have a name ending in .c.

Chapter 1

You need to compile your C program before you run it.

Chapter 1

You can use the && operator on the command line to only run your program if it compiles.

Chapter 1

count++ means add 1 to count.

Chapter 1

while repeats code as long as a condition is true.

Chapter 1

for loops are a more compact way of writing loops.

Chapter 1

gcc is the most popular C compiler.

Chapter 1

-o specifies the output file.

Chapter 1

count-- means subtract 1 from count.

Chapter 1

do-while loops run code at least once.

Pointers and memory ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Head First C#, 4th Edition

Head First C#, 4th Edition

Andrew Stellman, Jennifer Greene
C Programming Language, 2nd Edition

C Programming Language, 2nd Edition

Brian W. Kernighan, Dennis Ritchie

Publisher Resources

ISBN: 9781449335649Errata Page