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 →

Detailed Examination of a CSV File

Posted on March 1, 2017 by dgookin
Reply

The brutal winter continues in my area, with no end in site! I saved weather data collected for 31 days from December to January in a CSV file. This file was used in last month’s Exercise. For this month’s Exercise, your job is to read the same data file, but also to report on the results.
Continue reading →

Posted in Exercise | Leave a reply

Yes! It’s a String – or Number!

Posted on February 25, 2017 by dgookin
Reply

The standard library functions atoi() and atof() work well to translate text (ASCII) input into values, an int or float, respectively. When your code must know whether a string is really a value, more processing is required.
Continue reading →

Posted in Lesson | Leave a reply

Value or String?

Posted on February 18, 2017 by dgookin
Reply

My philosophy is to treat the input as a string until I can confirm that it’s not. The question then rises as to how strings can best translate into a value.
Continue reading →

Posted in Lesson | Leave a reply

Manipulate Pointers in Functions, Part V

Posted on February 11, 2017 by dgookin
Reply

In Part II of this series, I showed code that let you pass a pointer’s address to a function. Within that function, the address can be manipulated and value at that address displayed. Can the same thing be done with a two-dimensional array, which is loosely related to a ** pointer?
Continue reading →

Posted in Lesson | Leave a reply

The CSV File – Solution

Posted on February 8, 2017 by dgookin
Reply

This month’s Exercise, required you to read a CSV file, extract specific information, and output a table. It’s basically a file-reading exercise, though you must also translate the input into the proper value. And you must output the month as a string.
Continue reading →

Posted in Solution | Leave a reply

Manipulate Pointers in Functions, Part IV

Posted on February 4, 2017 by dgookin
Reply

Those programmers I wrote about in last week’s Lesson, the ones who avoid the ** pointer notation, usually do so by using a two-dimensional array instead of the ** pointer thing. It’s a quick substitute, but it’s not exactly the same thing.
Continue reading →

Posted in Lesson | Leave a reply

The CSV File

Posted on February 1, 2017 by dgookin
Reply

Of all the common file formats, the CSV is probably the oldest one still in use. It’s a plain text file, so the formatted data appears is readable by humans: Each line is a record. Each field is separated by a single comma.
Continue reading →

Posted in Exercise | Leave a reply

Manipulate Pointers in Functions, Part III

Posted on January 28, 2017 by dgookin
Reply

I know C programmers who make it their goal to avoid pointers — even where necessary. It’s possible to do so, and many have cheat sheets to help them. Then comes the ** pointer monster, which can be avoided altogether . . . until you need to manipulate a pointer variable’s own address within a function. Then you’re cursed.
Continue reading →

Posted in Lesson | Leave a reply

Manipulate Pointers in Functions, Part II

Posted on January 21, 2017 by dgookin
Reply

When a function must manipulate a pointer’s address, the argument passed is a pointer-pointer, not a pointer. Confused? Oh, I’m just getting started . . .
Continue reading →

Posted in Lesson | Leave a reply

Manipulate Pointers in Functions, Part I

Posted on January 14, 2017 by dgookin
Reply

It’s common to pass a pointer to a function. Within the function, you can manipulate the data the pointer references without having to return that data from the function. This aspect of a pointer is what makes C a powerful — and scary — programming language. But what about when you need to manipulate the pointer’s address in the function?
Continue reading →

Posted in Lesson | Leave a reply

Post navigation

← Older posts
Newer posts →

Recent Posts

  • Two File Descriptors?
  • Duping a File in the Raw
  • Ramanujan Nested Radicals – Solution
  • Rubbing a File Raw
  • Ramanujan Nested Radicals

Recent Comments

  • dgookin on Ramanujan Nested Radicals – Solution
  • Chris Webb on Ramanujan Nested Radicals – Solution
  • Chris Webb on Ramanujan Nested Radicals – Solution
  • Chris Webb on Ramanujan Nested Radicals
  • dgookin on Ramanujan Nested Radicals

Meta

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

Copyright © 1997-2026 by QPBC.
All rights reserved

Proudly powered by WordPress