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 →

A Pair of Arrays

Posted on February 1, 2021 by dgookin
Reply

Removing redundancies from your C code may not be your first goal, but it’s something you can definitely find later. One example is when you must initialize a pair of arrays. Why use two loops when one will do?
Continue reading →

Posted in Exercise | Leave a reply

It’s Parsing Time

Posted on January 30, 2021 by dgookin
Reply

A recent puzzle presented itself, one where I must extract a date based on a file’s name. The date is part of the name, but my code required I translate the date into a time_t value. It’s an awesome programming puzzle that involves many different tricks.
Continue reading →

Posted in Lesson | Leave a reply

The 27th International Obfuscated C Code Contest

Posted on January 23, 2021 by dgookin
Reply

The results of the 27th International Obfuscated C Code Contest were announced earlier this month. The code is amazing. It runs. It’s horrifyingly cryptic.
Continue reading →

Posted in Lesson | Leave a reply

Compiler Options in Code::Blocks

Posted on January 16, 2021 by dgookin
Reply

Like all IDEs, Code::Blocks is effectively a front for the clang, minGW, or gcc compiler lurking somewhere under its skin. While you don’t use these command line tools directly, you can control their options and settings from within the IDE.
Continue reading →

Posted in Lesson | Leave a reply

Compiler Options at the Command Prompt

Posted on January 9, 2021 by dgookin
3

The traditional C compiler is cc. Its GNU replacement in the Linux world is gcc. A better option is the LLVM clang compiler. As commands typed at a prompt, you control these compilers by setting command line options or switches.
Continue reading →

Posted in Lesson | 3 Replies

Find the Most Factors – Solution

Posted on January 8, 2021 by dgookin
Reply

The challenge for this month’s Exercise is to discover those values in the range 1 to 999 that have the highest number of factors. Never mind the math! Let C and the computer do the work for you.
Continue reading →

Posted in Solution | Leave a reply

Emulating the foreach Keyword

Posted on January 2, 2021 by dgookin
Reply

In last week’s Lesson, I covered how to obtain the number of elements in an array. This process is the first step to emulating the foreach keyword in the C language.
Continue reading →

Posted in Lesson | Leave a reply

Find the Most Factors

Posted on January 1, 2021 by dgookin
Reply

If given a pad, pencil, and a factor problem years ago, I would have found doing anything else in the world more exciting. Math is not my forte, yet it remains a curiosity. Especially with The Power Of The Computer, performing math exercises is more of an interesting challenge than a mental ordeal.
Continue reading →

Posted in Exercise | Leave a reply

In Search of the foreach Keyword

Posted on December 26, 2020 by dgookin
Reply

C has three looping keywords: do, for, and while. These keywords construct a block of statements that repeat, hopefully but not necessarily with a terminating condition. Other programming languages offer additional looping keywords, including the popular and useful foreach.
Continue reading →

Posted in Lesson | Leave a reply

Harmonic Series, Divergence, and C Code

Posted on December 19, 2020 by dgookin
2

A harmonic series is a mathematical contraption that deals with cascading fractions. Like the Fibonacci series, I thought I could easily code a harmonic series in C — which I did, but not before reading up on the topic of divergence.
Continue reading →

Posted in Lesson | 2 Replies

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Storing and Interpreting Mouse Input
  • Where is the Mouse?
  • Pulling Numbers from a String – Solution
  • What is the Mouse Doing?
  • Pulling Numbers from a String

Recent Comments

  • dgookin on Reading Raw Input
  • Chris Webb on Reading Raw Input
  • dgookin on Is It a “Real” Triangle? – Solution
  • Chris Webb on Is It a “Real” Triangle? – Solution
  • dgookin on A Colorful Hexdump

Meta

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

Copyright © 1997-2026 by QPBC.
All rights reserved

Proudly powered by WordPress