Skip to primary content
Skip to secondary content

C For Dummies Blog

Main menu

  • C For Dummies (home)
  • History
  • Series
  • Supplemental
  • Blog Miscellany

Author Archives: dgookin

Post navigation

← Older posts
Newer posts →

The Joys of Iteration

Posted on June 6, 2015 by dgookin
Reply

Suppose that you’re testing code and need to run a program six times in a row. You could keep repeating the program, running it multiple times, but why not write a utility that does the same thing? That would be a good and practical way to put the system() function to work.
Continue reading →

Posted in Lesson | Leave a reply

Let’s Go Bowling – An Entire Game!

Posted on June 1, 2015 by dgookin
Reply

In last month’s Exercise, the assignment was to craft a single frame in a game of bowling. This time, you need to stitch together 10 frames to simulate bowling an entire game.
Continue reading →

Posted in Exercise | Leave a reply

Hello, System

Posted on May 30, 2015 by dgookin
Reply

One thing that continues to puzzle me about learning the C language is how frequently beginners use the system() function. Is it a crutch? Is it a necessity? What’s the allure of this function that makes it show up in beginner code?
Continue reading →

Posted in Lesson | Leave a reply

Before You Say Goodbye . . .

Posted on May 23, 2015 by dgookin
Reply

The standard C library contains a lot of interesting and unusual routines. Some can really put the fun into function. One of them I’ve rarely used, but which can be extremely handy, is atexit().
Continue reading →

Posted in Lesson | Leave a reply

Build Your Own strcasestr() Function

Posted on May 16, 2015 by dgookin
Reply

I was a bit surprised the other day. I’d written code on my Macintosh and tried to run it on the PC. Because I usually write generic stuff, I figured that the code would compile and run on both systems. But it didn’t compile.
Continue reading →

Posted in Lesson | Leave a reply

Parsing the Command Line IV

Posted on May 9, 2015 by dgookin
Reply

Command line options often sport their own options or settings. For example, tab width might be set by specifying the tabwidth option followed by a value. No hard and fast rules exist for how such an option is set, but I’ve seen it happen in one of three ways:
Continue reading →

Posted in Lesson | Leave a reply

Let’s Go Bowling – Solution

Posted on May 8, 2015 by dgookin
Reply

You may find my solution for this month’s Exercise to be more complex than necessary, but there’s a method to my madness.
Continue reading →

Posted in Solution | Leave a reply

Parsing the Command Line III

Posted on May 2, 2015 by dgookin
Reply

Your code must consider whether or not command line options are present, that the user may type the options in any order, and that some or all of the option could be incorrect. That makes for a lot of processing, but it’s also forgiving and users prefer the flexibility.
Continue reading →

Posted in Lesson | Leave a reply

Let’s Go Bowling!

Posted on May 1, 2015 by dgookin
2

I went bowling the other day. Actually, I went to watch people bowl. I’m a terrible bowler, having never rolled anything higher than 148 in my life. Breaking 100 is a rare occasion. But one thing I can do well is understand how the scoring works.
Continue reading →

Posted in Exercise | 2 Replies

Parsing the Command Line II

Posted on April 25, 2015 by dgookin
Reply

When processing the main() function’s arguments, you must keep in mind the possibilities. Options are, after all, options. They might be there, they might not.
Continue reading →

Posted in Lesson | Leave a reply

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Code Page 437
  • Dumping the Screen in W-I-D-E Color
  • Which is Greatest? – Solution
  • Dumping the Screen in Color
  • Which is Greatest?

Recent Comments

  • dgookin on Code Page 437
  • Chris Webb on Code Page 437
  • dgookin on Code Page 437
  • M.Stumpfl on Code Page 437
  • dgookin on Dumping the Screen in W-I-D-E Color

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 1997-2025 by QPBC.
All rights reserved

Proudly powered by WordPress