| |
| |
Introduction | |
| |
| |
"What Will Understanding C Do for Me?" | |
| |
| |
About This Here Dummies Approach | |
| |
| |
How to Work the Examples in This Book | |
| |
| |
Foolish Assumptions | |
| |
| |
Icons Used in This Book | |
| |
| |
What's New with This Edition? | |
| |
| |
Final Thots | |
| |
| |
| |
Introduction to C Programming | |
| |
| |
| |
Up from the Primordial C | |
| |
| |
An Extremely Short and Cheap History of the C Language | |
| |
| |
The C Development Cycle | |
| |
| |
From Text File to Program | |
| |
| |
Save It! Compile and Link It! Run It! | |
| |
| |
| |
C of Sorrow, C of Woe | |
| |
| |
The Required Woes of Editing and Recompiling | |
| |
| |
Dealing with the Heartbreak of Errors | |
| |
| |
| |
C Straight | |
| |
| |
The Big Picture | |
| |
| |
C Language Pieces' Parts | |
| |
| |
The C Language Itself--the Keywords | |
| |
| |
Other C Language Components | |
| |
| |
Pop Quiz! | |
| |
| |
The Helpful RULES Program | |
| |
| |
| |
C What I/O | |
| |
| |
Introduce Yourself to Mr. Computer | |
| |
| |
More on printf() | |
| |
| |
Scanf Is Pronounced "Scan-Eff" | |
| |
| |
| |
To C or Not to C | |
| |
| |
Adding Comments | |
| |
| |
Comment Styles of the Nerdy and Not-Quite-Yet-Nerdy | |
| |
| |
Using Comments to Disable | |
| |
| |
The Perils of "Nested" Comments | |
| |
| |
| |
C More I/O with gets() and puts() | |
| |
| |
The More I Want, the More I gets() | |
| |
| |
The Virtues of puts() | |
| |
| |
| |
Run and Scream from Variables and Math | |
| |
| |
| |
A + B = C | |
| |
| |
The Ever-Changing Variable | |
| |
| |
Welcome to the Cold World of Numeric Variables | |
| |
| |
A Wee Bit o' Math | |
| |
| |
| |
Charting Unknown Cs with Variables | |
| |
| |
Cussing, Discussing, and Declaring Variables | |
| |
| |
Constants and Variables | |
| |
| |
| |
How to C Numbers | |
| |
| |
There Are Numbers, and Then There Are Numbers | |
| |
| |
How to Make a Number Float | |
| |
| |
Bigger than the Float, It's a Double! | |
| |
| |
Formatting Your Zeroes and Decimal Places | |
| |
| |
| |
Cook That C Variable Charred, Please | |
| |
| |
The Other Kind of Variable Type, the char | |
| |
| |
Reading and Writing Single Characters | |
| |
| |
Character Variables As Values | |
| |
| |
| |
Giving Your Programs the Ability to Run Amok | |
| |
| |
| |
C More Math and the sacred Order of Precedence | |
| |
| |
An All-Too-Brief Review of the Basic C Mathematical Operators | |
| |
| |
The Delicate Art of Incrementation (Or, "Just Add One to It") | |
| |
| |
The Sacred Order of Precedence | |
| |
| |
| |
C the Mighty if Command | |
| |
| |
If Only | |
| |
| |
If It Isn't True, What Else? | |
| |
| |
| |
What If C==C? | |
| |
| |
The World of if without Values | |
| |
| |
Using the if Keyword to Compare Two Strings | |
| |
| |
| |
Iffy C Logic | |
| |
| |
Exposing Flaws in logic | |
| |
| |
If, And, Or, But | |
| |
| |
| |
C You Again | |
| |
| |
For Going Loopy | |
| |
| |
I'm Bustin' Outta Here! | |
| |
| |
| |
C the Loop, C the Loop++ | |
| |
| |
The Art of Incrementation | |
| |
| |
The Mysterious Practice of Decrementation | |
| |
| |
More Incrementation Madness | |
| |
| |
| |
C You in a While Loop | |
| |
| |
The Lowdown on while Loops | |
| |
| |
Not to Beat a Dead Horse or Anything | |
| |
| |
| |
Do C While You Sleep | |
| |
| |
The Down-Low on Upside-Down do-while Loops | |
| |
| |
Nested Loops and Other Bird-Brained Concepts | |
| |
| |
Break the Brave and Continue the Fool | |
| |
| |
| |
Switch Case, or, From 'C' to Shining 'c' | |
| |
| |
The Sneaky switch-case Loops | |
| |
| |
The switch-case Solution to the LOBBY Program | |
| |
| |
The Old switch-case Trick | |
| |
| |
The Special Relationship between while and switch-case | |
| |
| |
| |
C Level | |
| |
| |
| |
Writing That First Function | |
| |
| |
Meet Mr. Function | |
| |
| |
Prototyping Your Functions | |
| |
| |
The Tao of Functions | |
| |
| |
| |
Contending with Variables in Functions | |
| |
| |
Bombs Away with the BOMBER Program! | |
| |
| |
How We Can All Share and Love with Global Variables | |
| |
| |
| |
Functions That Actually Funct | |
| |
| |
Marching a Value Off to a Function | |
| |
| |
Sending More than One Value to a Function | |
| |
| |
Functions That Return Stuff | |
| |
| |
No Need to Bother with This C Language Trivia If You're in a Hurry | |
| |
| |
| |
The Stuff That Comes First | |
| |
| |
Please Don't Leave Me Out! | |
| |
| |
What the # defines Are Up To | |
| |
| |
Avoiding the Topic of Macros | |
| |
| |
| |
The printf() Chapter | |
| |
| |
A Quick Review of printf() | |
| |
| |
The Old Displaying-Text-with-printf() Routine | |
| |
| |
The printf() Escape Sequences | |
| |
| |
The Complex printf() Format | |
| |
| |
The printf() Conversion Characters | |
| |
| |
| |
Math Madness! | |
| |
| |
More on Math | |
| |
| |
Strange Math? You Got It! | |
| |
| |
Something Really Odd to End Your Day | |
| |
| |
| |
The Old Random-Number Function | |
| |
| |
On Being Random | |
| |
| |
The Diabolical Dr. Modulus | |
| |
| |
Rolling the Dice with the Final RANDOM Program | |
| |
| |
| |
Part of Tens | |
| |
| |
| |
Ten More Things You Need to Know about the C Language | |
| |
| |
Arrays | |
| |
| |
Strings | |
| |
| |
Structures | |
| |
| |
Pointers | |
| |
| |
Linked Lists | |
| |
| |
Binary Operators | |
| |
| |
Interacting with the Command Line | |
| |
| |
Disk Access | |
| |
| |
Interacting with the Operating System | |
| |
| |
Building Big Programs | |
| |
| |
| |
Ten Tips for the Budding Programmer | |
| |
| |
Use the Command-Line History | |
| |
| |
Keep Your Editor Open in Another Window | |
| |
| |
Use a Context-Colored Text Editor | |
| |
| |
Know the Line-Number Commands in Your Editor | |
| |
| |
Keep a Command Prompt Window Open If You're Using the IDE | |
| |
| |
Know a Few Handy Command-Prompt Commands | |
| |
| |
Carefully Name Your Variables | |
| |
| |
Know Your Post- and Pre-Incrementing and Decrementing Riddles | |
| |
| |
Breaking Out of a Loop | |
| |
| |
| |
Ten Ways to Solve Your Own Programming Problems | |
| |
| |
Work on One Thing at a Time | |
| |
| |
Break Up Your Code | |
| |
| |
Simplify | |
| |
| |
Talk through the Program | |
| |
| |
Set Breakpoints | |
| |
| |
Monitor Your Variables | |
| |
| |
Document Your Work | |
| |
| |
Use Debugging Tools | |
| |
| |
Use a C Optimizer | |
| |
| |
Read More Books! | |
| |
| |
| |
The Stuff You Need to Know before You Read All the Other Stuff in This Book | |
| |
| |
Setting Things Up | |
| |
| |
The C language compiler | |
| |
| |
The place to put your stuff | |
| |
| |
Making Programs | |
| |
| |
Finding your learn directory or folder | |
| |
| |
Running an editor | |
| |
| |
Compiling and linking | |
| |
| |
| |
ASCII Table | |
| |
| |
Index | |