Skip to primary content
Skip to secondary content

C For Dummies Blog

Main menu

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

Category Archives: Solution

Post navigation

← Older posts

The Clock Angle Problem – Solution

Posted on October 8, 2026 by dgookin
3

The challenge for this month’s Exercise is to report the angle between two hands on an analog clock. The result must be positive and it must reflect the lesser of two possible degrees.
Continue reading →

Posted in Solution | 3 Replies

Too Big – Solution

Posted on September 8, 2026 by dgookin
6

This month’s Exercise is about finding the limits, or how large a signed or unsigned char value can get before it flips over to negative or to zero. And the trick is performing this feat in your code without using the defined constants for a char data type available in the limits.h header file.
Continue reading →

Posted in Solution | 6 Replies

Ramanujan Nested Radicals – Solution

Posted on August 8, 2026 by dgookin
3

The topic for this month’s Exercise is to code a recursive function that solves the Ramanujan Nested Radical, illustrated in Figure 1. Remember that Ramanujan created and solved this puzzle in his head. #genius
Continue reading →

Posted in Solution | 3 Replies

It’s All Greek! – Solution

Posted on July 8, 2026 by dgookin
2

As a wrap-up for my ctype questions, this month’s Exercise is to write a ctype function that converts lowercase Greek letters to uppercase and vice-versa. This challenge isn’t a steep hill to climb, once you know the pattern of Unicode Greek letter values, and ignore the required accent and breathing marks that frequently adorn various letters.
Continue reading →

Posted in Solution | 2 Replies

That Series That Lacks a Name but Equals 5e – Solution

Posted on June 8, 2026 by dgookin
4

Once again, I dive into the murky waters of mathematics for this month’s Exercise. The challenge is to code the Series That Has No Name (STHNN), which converges on the value 5e.
Continue reading →

Posted in Solution | 4 Replies

Pointers to Multi-Dimension Arrays – Solution

Posted on May 8, 2026 by dgookin
Reply

The challenge for this month’s Exercise is to use pointers to work through a multi-dimensional array. As I mentioned in the exercise post, multi-dimensional arrays are all stored as a single-dimension where the compiler calculates offsets for rows and columns (and more) for you.
Continue reading →

Posted in Solution | Leave a reply

A Little Bit Off the Sides – Solution

Posted on April 8, 2026 by dgookin
5

The C language woefully lacks a trim() or similar string manipulation function. Rather than let it flail in absent envy, your task for this month’s Exercise is to code such a function. The goal is to remove whitespace characters from either end of a string.
Continue reading →

Posted in Solution | 5 Replies

What is the Largest Value – Solution

Posted on March 8, 2026 by dgookin
Reply

Once again, the challenge for this month’s exercise is to unravel a math puzzle. This time, the puzzle reads like this:
Continue reading →

Posted in Solution | Leave a reply

Pulling Numbers from a String – Solution

Posted on February 8, 2026 by dgookin
Reply

This month’s C programming exercise is to extract numbers from a string. Specifically, your task is to code the extract() function that returns the address of a digit found in a string. This function must also be capable of repeat calls to continue locating digits within the same string.
Continue reading →

Posted in Solution | Leave a reply

Is It a “Real” Triangle? – Solution

Posted on January 8, 2026 by dgookin
2

The challenge for this month’s Exercise is to generate three random values and determine if they work as sides of a valid triangle. To make this determination, you must consider three types of triangles and test the generated values for each.
Continue reading →

Posted in Solution | 2 Replies

Post navigation

← Older posts

Recent Posts

  • Tagging a Union
  • The Clock Angle Problem – Solution
  • The Scary Part of the Union
  • The Clock Angle Problem
  • Back When Unions Were Useful

Recent Comments

  • dgookin on The Clock Angle Problem – Solution
  • Chris Webb on The Clock Angle Problem – Solution
  • Chris Webb on The Clock Angle Problem – Solution
  • dgookin on The Clock Angle Problem
  • Chris Webb on The Clock Angle Problem

Meta

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

Copyright © 1997-2026 by QPBC.
All rights reserved

Proudly powered by WordPress