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 →

Filename Extractor

Posted on November 1, 2017 by dgookin
Reply

Last month’s Exercise demonstrated a filename-extractor, but it cheated: The filename was always the same: same text, same length. That’s not always the case in the real world.
Continue reading →

Posted in Exercise | Leave a reply

Sorted List Presentation, Part V

Posted on October 28, 2017 by dgookin
Reply

The process of converting the sample program from one that relies upon constants to one that exclusively uses variables is nearly complete. Only two steps are left:
Continue reading →

Posted in Lesson | Leave a reply

Sorted List Presentation, Part IV

Posted on October 21, 2017 by dgookin
Reply

Last week’s Lesson accomplished the task of obtaining the number of elements in the fruit[] array. This week, the task is to obtain the next item, the widest string in the array. This item is currently a constant, but it must become a variable to ensure the code’s flexibility.
Continue reading →

Posted in Lesson | Leave a reply

Sorted List Presentation, Part III

Posted on October 14, 2017 by dgookin
Reply

Once you accept that a program’s data set is flexible, you must abandon all constants and use variables. It’s a good move: The variables ensure that no matter what changes with the data, the code can handle it.
Continue reading →

Posted in Lesson | Leave a reply

Right String – Solution

Posted on October 8, 2017 by dgookin
Reply

For this month’s Exercise, I offer both a string function solution as well as a solution that uses pointers. As you can guess, I thought of the string method first, which is where most programmers would run to avoid the dratted topic of pointers.
Continue reading →

Posted in Solution | Leave a reply

Sorted List Presentation, Part II

Posted on October 7, 2017 by dgookin
Reply

It’s easy to code single-column list output. It takes a bit more programming skill to present the list in columns. To sort the list by columns is the most difficult. Like many programming tasks, it’s one of those things that once you figure it out, you just keep stealing your own code to do it again and again.
Continue reading →

Posted in Lesson | Leave a reply

Right String

Posted on October 1, 2017 by dgookin
Reply

A recent web page programming puzzle reminded me of an old BASIC language function, RIGHT$. The “right-string” function returns the rightmost n characters from a string. Such a function would have helped me greatly in my web page programming task.
Continue reading →

Posted in Exercise | Leave a reply

Sorted List Presentation, Part I

Posted on September 30, 2017 by dgookin
Reply

Sometimes programming can be a snap, especially when you have a known data set and pretty much all the values are static. You can whip out code right away, it runs well and looks beautiful — but that’s because everything is known. The fewer variables, the easier to code.
Continue reading →

Posted in Lesson | Leave a reply

Structures of Pointer Structures in Structures

Posted on September 23, 2017 by dgookin
Reply

Nested structures present another opportunity for pointers to growl in your code. The struggle is knowing which structure member operator to use — and where.
Continue reading →

Posted in Lesson | Leave a reply

Pointers on Pointers in Structures

Posted on September 16, 2017 by dgookin
Reply

Structures are the complex variable type in C, allowing you to craft data-rich units for storing and retrieving all sorts of interesting information. They’re fun! But like asterisks falling as snowflakes, sprinkle some pointers into a structure and you can get into trouble fast.
Continue reading →

Posted in Lesson | Leave a reply

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Storing and Interpreting Mouse Input
  • Where is the Mouse?
  • Pulling Numbers from a String – Solution
  • What is the Mouse Doing?
  • Pulling Numbers from a String

Recent Comments

  • dgookin on Reading Raw Input
  • Chris Webb on Reading Raw Input
  • dgookin on Is It a “Real” Triangle? – Solution
  • Chris Webb on Is It a “Real” Triangle? – Solution
  • dgookin on A Colorful Hexdump

Meta

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

Copyright © 1997-2026 by QPBC.
All rights reserved

Proudly powered by WordPress