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 →

Messing with Array Subscripts

Posted on May 11, 2024 by dgookin
4

Array notation involves the array’s name followed by a set of square brackets. Within these brackets is a reference to the array element’s number. It’s important to remember that the first element is zero. But the subscript need not always be a constant integer.
Continue reading →

Posted in Lesson | 4 Replies

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

Tending Toward Obfuscation

Posted on May 4, 2024 by dgookin
Reply

I’m always mindful of the beginner when I write code for this blog. Even with my own code, I often go to pains to write things “the long way” just because I’m in the habit. Not every coder is so thoughtful. The reason is that C tends toward obfuscation. We must revel in this capability.
Continue reading →

Posted in Lesson | Leave a reply

Calculating the Standard Deviation

Posted on May 1, 2024 by dgookin
Reply

Difficulty: ★ ★ ☆ ☆

Even when statistics has barely brushed by you on the subway, you probably know the term standard deviation. It refers to how data is distributed in a group, their distance from the mean. You can use your C programming kung fu to code the standard deviation of a data set, which is the challenge for this month’s Exercise.
Continue reading →

Posted in Exercise | Leave a reply

From Void to Integer

Posted on April 27, 2024 by dgookin
3

You can’t just slap a data type upon a variable declared as void. No, a void type can be assigned a pointer. But even then, you can’t just typecast that pointer as an int and get away with it.
Continue reading →

Posted in Lesson | 3 Replies

Out of the void

Posted on April 20, 2024 by dgookin
Reply

The four standard data types in C programming are char, int, float, and double. A fifth type is void, which is used to declare storage of an unknown type. My goal is to see how badly I can abuse this data type.
Continue reading →

Posted in Lesson | Leave a reply

C Blog 11th Anniversary

Posted on April 13, 2024 by dgookin
4


Today marks this blog’s 11th anniversary. The first post was made 11 years ago on April 13th, 2013. This date coincided with the release of my book, Beginning Programming with C For Dummies.
Continue reading →

Posted in Uncategorized | 4 Replies

Using the epoll() Function to Scan for Standard Input

Posted on April 13, 2024 by dgookin
2

As with the select() function covered in last week’s Lesson, you can use other networking functions to scan for pending standard input while a program otherwise spins busy. The epoll() family of functions allow for such monitoring.
Continue reading →

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

Reading the Keyboard Queue ala Networking

Posted on April 6, 2024 by dgookin
3

A network program monitors one or more file descriptors (such as sockets) for activity. It reacts when information is ready to process. This technique can also be applied to keyboard input, though not as elegantly as the kbhit() function shown in last week’s Lesson.
Continue reading →

Posted in Lesson | 3 Replies

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Obtaining the Averages
  • Extracting Data Chunks
  • C Blog 13th Anniversary
  • Colorful Data Chunks
  • A Little Bit Off the Sides – Solution

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