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 →

Numbers with Unique Digits

Posted on November 1, 2023 by dgookin
Reply

Difficulty: ★ ★ ★ ☆

I’m sure some eccentric term exists to describe a number where no digits repeat. Whether this concept has any mathematical relevance remains uncertain. But it’s the type of problem you can easily solve by writing a computer program.
Continue reading →

Posted in Exercise | Leave a reply

Plucking Out a Random Word

Posted on October 28, 2023 by dgookin
Reply

It’s time for your computer to babble nonsensically. No alcohol is necessary. All you must do is pluck out a random word from the dictionary. Run the program several times and you have babbly nonsense: subtotal spectacles lute's sushi's. Brilliant! *HIC*
Continue reading →

Posted in Lesson | Leave a reply

Finding the Long Words

Posted on October 21, 2023 by dgookin
Reply

Beyond knowing how many words are in the computer’s dictionary, another good measure to know is how many characters are in the longest word. Together, these two values give you a profile for the complete word matrix.
Continue reading →

Posted in Lesson | Leave a reply

Reading the Dictionary

Posted on October 14, 2023 by dgookin
Reply

I admit it: I’m a nerd and I read the dictionary. I know it’s a reference, not a work of fiction. The plot is weak. But I found it enjoyable as a kid to discover new words and their meanings. Alas, the Unix dictionary file lists only words and not definitions. But how many words are in there?
Continue reading →

Posted in Lesson | Leave a reply

Coin Flipping Madness – Solution

Posted on October 8, 2023 by dgookin
Reply

I hope you didn’t “flip out” over this month’s Exercise. Flipping a coin can be done by hand or by using a computer. Using a computer is easier because it can be programmed to record each flip and it saves you hand muscle molecules for flipping and the chore of writing down the results.
Continue reading →

Posted in Solution | Leave a reply

Finding the Dictionary

Posted on October 7, 2023 by dgookin
Reply

My first Unix System Administrator job was pretty routine: I did backups. It was only later that I discovered some of the many nerdy treasures available in that operating system.
Continue reading →

Posted in Lesson | Leave a reply

Coin Flipping Madness!

Posted on October 1, 2023 by dgookin
Reply

Difficulty: ★ ★ ☆ ☆

Probability. Odds. These are words I often confuse, but the similarity relates to how often things happen. The gold standard is the flip of a coin: two possibilities, heads or tails. If you don’t understand how it works, you can write code to drive home the point.
Continue reading →

Posted in Exercise | Leave a reply

Using make to Build Projects

Posted on September 30, 2023 by dgookin
2

The make utility has been around since the early days of Unix. This tool is designed to create large projects by compiling and linking files based on dependencies. It takes care of a lot problems managing multi-module files to streamline the build process.
Continue reading →

Posted in Lesson | 2 Replies

Memory-File Multi-Module Implementation

Posted on September 23, 2023 by dgookin
Reply

At 205 lines of code in last week’s Lesson, my memory-file project is getting larger by the day. At some point, the source code files must be broken out into separate modules, then compiled and linked separately. This is how I handle all large projects when it becomes too unwieldly to edit everything in a single file.
Continue reading →

Posted in Lesson | Leave a reply

Enabling Random Memory-File Access

Posted on September 16, 2023 by dgookin
Reply

The two types of file access are sequential and random. Sequential access means the file’s data is read from beginning to end, one byte after the other. Random access isn’t random in the sense that it’s haphazard. No, random access means you can read data from any position in the file: beginning, middle, or end.
Continue reading →

Posted in Lesson | Leave a reply

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Heron’s Formula – Solution
  • Coding a Better stringcopy() Function
  • Heron’s Formula
  • Copying Strings
  • Finding Those Pesky Null Characters!

Recent Comments

  • dgookin on Heron’s Formula
  • Chris Webb on Heron’s Formula
  • dgookin on Heron’s Formula
  • Chris Webb on Heron’s Formula
  • dgookin on Finding Those Pesky Null Characters!

Meta

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

Copyright © 1997-2025 by QPBC.
All rights reserved

Proudly powered by WordPress