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
Newer posts →

Clear the Screen – Solution

Posted on July 8, 2024 by dgookin
4

The task for this month’s Exercise is to clear the screen. I pray you didn’t arrive at a solution that outputs multiple blank lines. No, you must use the ANSI codes offered in the exercise post to manipulate the cursor and wipe clean the screen. Or you could cheat, which is what I did.
Continue reading →

Posted in Solution | 4 Replies

Adding Two Values – Solutions

Posted on June 8, 2024 by dgookin
Reply

This month’s Exercise is rather simple, though it doesn’t promise a simple solution. Instead, I offer three solutions. One of which is obvious and two are kind of out there. They all work, which is the point.
Continue reading →

Posted in Solution | Leave a reply

Calculating the Standard Deviation – Solution

Posted on May 8, 2024 by dgookin
6

The challenge for this month’s Exercise is to calculate the standard deviation for a given set of data points. It’s a “whole population calculation” because all the data points are present. The trick is to follow the equation, transforming it from cryptic math mumbo-jumbo into C code.
Continue reading →

Posted in Solution | 6 Replies

Calculating the Absolute Value – Solution

Posted on April 8, 2024 by dgookin
2

This month’s Exercise may not have been challenging. Still, remember that blog is about learning the C language. Sometimes performing what could be a simple task may end up being complex than you anticipated.
Continue reading →

Posted in Solution | 2 Replies

Calculating the Subfactorial – Solution

Posted on March 8, 2024 by dgookin
Reply

Do you feel adequately deranged working this month’s Exercise? I’m more of a math fanboy than an expert, yet I enjoyed the process of coding a subfactorial based in the equation presented.
Continue reading →

Posted in Solution | Leave a reply

Positive Negative Positive Negative – Solution

Posted on February 8, 2024 by dgookin
4

This month’s Exercise presents what I often refer to as a code “toggle.” Many paths lead to a solution.
Continue reading →

Posted in Solution | 4 Replies

The swap() Function – Solution

Posted on January 8, 2024 by dgookin
3

This month’s Exercise is to code a function that swaps two variables. The challenge really isn’t to swap the variables, but to figure out how to code a function that does so.
Continue reading →

Posted in Solution | 3 Replies

Tetration – Solution

Posted on December 8, 2023 by dgookin
Reply

Tetration is a bizarre mathematical concept. I’ve watched quite a few YouTube videos where math geeks explain the details. They venture into the terrifying territory of humongous numbers that would consume the known universe. Your programming challenge for this month’s Exercise is far less massive.
Continue reading →

Posted in Solution | Leave a reply

Numbers with Unique Digits – Solution

Posted on November 8, 2023 by dgookin
1

I hope you came up with an interesting solution for this month’s Exercise, one different from my own. The goal is to output unique values from zero through ten billion, values where no two digits repeat.
Continue reading →

Posted in Solution | 1 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

Post navigation

← Older posts
Newer posts →

Recent Posts

  • C Blog 13th Anniversary
  • Colorful Data Chunks
  • A Little Bit Off the Sides – Solution
  • Working with Data Chunks
  • A Little Bit Off the Sides

Recent Comments

  • dgookin on C Blog 13th Anniversary
  • M.Stumpfl on C Blog 13th Anniversary
  • Chris Webb on C Blog 13th Anniversary
  • M.Stumpfl on A Little Bit Off the Sides – Solution
  • dgookin on A Little Bit Off the Sides – Solution

Meta

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

Copyright © 1997-2026 by QPBC.
All rights reserved

Proudly powered by WordPress