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 →

Fun with switch case, Part I

Posted on February 24, 2024 by dgookin
2

The switch-case construction, or switch statement, provides your code with a decision tree that both easy to read and to debug. This construction is a bit daunting for the beginner, but becomes more familiar as you use it. It’s not without its quirks.
Continue reading →

Posted in Lesson | 2 Replies

Creating Your Own Environment Variables

Posted on February 17, 2024 by dgookin
Reply

Programs use environment variables, thanks to the getenv() function shown in last week’s Lesson. They can also create their own environment variables, reset variable values, and remove variables.
Continue reading →

Posted in Lesson | Leave a reply

Peering into the Environment

Posted on February 10, 2024 by dgookin
Reply

The operating system’s environment provides temporary storage for variables, settings, and options. These values are easily accessible from any C program. One of the first posts I made on this blog was about accessing the environment. Time to revisit.
Continue reading →

Posted in Lesson | 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

A Nifty Little Test

Posted on February 3, 2024 by dgookin
Reply

When I teach C programming, I’m careful to admonish beginners about the difference between the = (assignment) and == (is equal to) operators. Yet there are times when these two operators collaborate.
Continue reading →

Posted in Lesson | Leave a reply

Positive Negative Positive Negative

Posted on February 1, 2024 by dgookin
2

Difficulty: ★ ☆ ☆ ☆

One of my pastimes is watching math videos. I was a terrible math student, but I enjoy the videos. Occasionally a concept is presented that I can program in C. This month’s Exercise covers one of these concepts.
Continue reading →

Posted in Exercise | 2 Replies

The C23 Deprecated and Removed Collection

Posted on January 27, 2024 by dgookin
5

As with all language updates, things change. Some of these items are deprecated while others are outright removed. Here’s the list.
Continue reading →

Posted in Lesson | 5 Replies

New C23 Language Features

Posted on January 20, 2024 by dgookin
5

While other programming languages seem to improve and update in great leaps, C moves at a glacial pace. The C23 upgrade offers a few new and exciting features, but nothing I would call impressive or awesome.
Continue reading →

Posted in Lesson | 5 Replies

Initializing Arrays in C23

Posted on January 13, 2024 by dgookin
8

You can initialize an array in the C programming languages in three ways: Not at all, only some elements, or all of the elements. Some compilers offer a fourth way, which initializes all elements to the same value. With the C23 standard, yet another way to initialize an array is possible.
Continue reading →

Posted in Lesson | 8 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

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Dumping the Screen in W-I-D-E Color
  • Which is Greatest? – Solution
  • Dumping the Screen in Color
  • Which is Greatest?
  • Consistently Constant

Recent Comments

  • dgookin on Dumping the Screen in W-I-D-E Color
  • M.Stumpfl on Dumping the Screen in Color
  • Chris Webb on Dumping the Screen in W-I-D-E Color
  • Chris Webb on Dumping the Screen in Color
  • M.Stumpfl on Dumping the Screen in Color

Meta

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

Copyright © 1997-2025 by QPBC.
All rights reserved

Proudly powered by WordPress