Skip to primary content
Skip to secondary content

C For Dummies Blog

Main menu

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

Post navigation

← Older posts
Newer posts →

Ethiopian Multiplication

Posted on November 1, 2024 by dgookin
Reply

Difficulty: ★ ★ ☆ ☆

I remember memorizing the “times tables,” which is how most American kids learn to multiply. Committing single digit multiplication values to memory helps perform multiplication and division problems, but it’s not the only way to calculate the result.
Continue reading →

Posted in Exercise | Leave a reply

Seeing What’s Left Over with Division

Posted on October 26, 2024 by dgookin
Reply

Learning division in school means long division. The process involves a quotient and a remainder. For example, 42÷8 works out to 5 (quotient) with 2 remainder. On a computer, however, division renders the result as 5.25. So how do you get the remainder separated?
Continue reading →

Posted in Lesson | Leave a reply

The Second K&R Program (That No One Talks About)

Posted on October 19, 2024 by dgookin
Reply

The original K&R, the first C programming book — and truly the programming book all others are based upon, is famous for its “Hello, world!” program. It’s the first program in the book. But what about the second program? Do you know what it is?
Continue reading →

Posted in Lesson | Leave a reply

More Terminal Screen Manipulation

Posted on October 12, 2024 by dgookin
Reply

Bouncing a cursor on the screen is a fun programming exercise, and you can use common C library techniques and ANSI escape sequences to make it happen in a terminal window, as covered in last week’s Lesson. At this point, most programmers would be content and leave well enough alone. Not me!
Continue reading →

Posted in Lesson | Leave a reply

Multiplying Matrixes – Solution

Posted on October 8, 2024 by dgookin
Reply

My solution for this month’s Exercise relies upon the solution from last month’s Exercise, specifically the way the matrixes are presented in the main() function and the use of the output() function. What I added is the multiply() function, which multiplies the two matrixes.
Continue reading →

Posted in Solution | Leave a reply

Bouncing an Asterisk

Posted on October 5, 2024 by dgookin
Reply

For last week’s Lesson, I gathered various techniques to show how the terminal screen can be manipulated directly in C without using a library like Ncurses. I have a few more tricks to show.
Continue reading →

Posted in Lesson | Leave a reply

Multiplying Matrixes

Posted on October 1, 2024 by dgookin
Reply

Difficulty: ★ ★ ★ ☆

The task for last month’s Exercise was to describe complex data — a matrix. For this month’s Exercise, your task is to multiply these matrixes.
Continue reading →

Posted in Exercise | Leave a reply

Playing with the Terminal

Posted on September 28, 2024 by dgookin
Reply

I miss the bad old days, back when I first learned to program. The microcomputers of the day were single user, single task. The hardware was directly accessible. You can truly do some messing around, which was quite entertaining for a budding programmer.
Continue reading →

Posted in Lesson | Leave a reply

The Look-and-Say Sequence
(As Much as the Computer Can)

Posted on September 21, 2024 by dgookin
Reply

Coding a Look-and-Say sequence should be fun, just like any C programming project where you’re not under pressure from a deadline. From last week’s Lesson, I was able to create a nested loop that takes a number and outputs its Look-and-Say values. It’s time to update this code to output a sequence.
Continue reading →

Posted in Lesson | Leave a reply

Coding a Look-and-Say Sequence

Posted on September 14, 2024 by dgookin
Reply

You may have seen this sequence on the Internet, in one of those “guess which number goes next?” type of posts:

1 11 21 1211 ...

So, which number comes next? I suppose it’s possible to divine a solution mathematically, but this sequence is known as a Look-and-Say sequence.
Continue reading →

Posted in Lesson | Leave a reply

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Finding a Binary Date
  • Having Fun with goto – Solution
  • Today’s Date is Binary!
  • Having Fun with goto
  • Filling the Pointer Pointers with Data

Recent Comments

  • dgookin on Having Fun with goto
  • M.Stumpfl on Having Fun with goto
  • dgookin on Having Fun with goto
  • M.Stumpfl on Having Fun with goto
  • M.Stumpfl on Having Fun with goto

Meta

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

Copyright © 1997-2025 by QPBC.
All rights reserved

Proudly powered by WordPress