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 →

The Difference Between NULL and Zero

Posted on July 27, 2013 by dgookin
2

University professors will try to drive the point into your head all semester: NULL and zero are not the same thing! But yet, you’ve looked into memory, you’ve examined the code. That thing they call NULL sure does look like a zero! What’s the big difference?
Continue reading →

Posted in Lesson | 2 Replies

What is True?

Posted on July 20, 2013 by dgookin
Reply

True is a logical condition. It’s often written TRUE just to confuse it with “true” which is a word that has other implications. But for programming, TRUE generally means success. It’s the opposite of FALSE, which generally means failure.
Continue reading →

Posted in Lesson | Leave a reply

For Ever

Posted on July 13, 2013 by dgookin
Reply

The most basic and perhaps ancient of programming techniques is the loop. And the most basic loop is the for loop. It’s also pretty flexible.
Continue reading →

Posted in Lesson | Leave a reply

Multiplying Without Multiplication

Posted on July 6, 2013 by dgookin
Reply

Long, long ago, I was an ardent assembly language programmer. I admired coding in assembly because the programs were small and fast. On the early microcomputers, that was a plus.
Continue reading →

Posted in Lesson | Leave a reply

We Have a Winnah!

Posted on July 1, 2013 by dgookin
Reply

The game of Tic-Tac-Toe is played on a simple 3-by-3 grid, what C programmers would call a matrix. It’s not The Matrix, of course, but it’s a simple array in which players can battle.
Continue reading →

Posted in Exercise | Leave a reply

Text to Value Conversion

Posted on June 29, 2013 by dgookin
Reply

Sure, your programs can accept values from the input stream, but most of the time numeric input comes in the form of text. The issue then becomes how to transform the string “1234” into the value 1234.
Continue reading →

Posted in Lesson | Leave a reply

Hi-Low

Posted on June 22, 2013 by dgookin
Reply

Here’s a brain puzzle for you: Write a function that accepts a numeric array and returns the high and low values from that array. Can it be done?
Continue reading →

Posted in Lesson | Leave a reply

Say It in Binary

Posted on June 15, 2013 by dgookin
Reply

01010011011000010111100100100000010010010111010000100000
01101001011011100010000001000010011010010110111001100001
011100100111100100001010

Continue reading →

Posted in Lesson | Leave a reply

Round Me Up, Round Me Down

Posted on June 8, 2013 by dgookin
2

The C language library features a few rounding functions, but most of them deal with trimming floating point values down (or up) to integers. The other day I encountered an interesting problem: How to round a value up or down to the nearest value of 5.
Continue reading →

Posted in Lesson | 2 Replies

1st, 2nd, and 3th

Posted on June 1, 2013 by dgookin
Reply

For your June exercise, you need to concoct code that properly generates an ordinal number. Write a function that returns a string “st” “nd” “rd” or “th” that’s tacked on to any integer value from 1 through what-have-you.
Continue reading →

Posted in Exercise | Leave a reply

Post navigation

← Older posts
Newer posts →

Recent Posts

  • It’s All Greek!
  • Ctype Function: isxdigit()
  • Ctype Function: ispunct()
  • Ctype Functions: isascii() and iscntrl()
  • That Series That Lacks a Name but Equals 5e – Solution

Recent Comments

  • dgookin on That Series That Lacks a Name but Equals 5e – Solution
  • Chris Webb on That Series That Lacks a Name but Equals 5e – Solution
  • Chris Webb on That Series That Lacks a Name but Equals 5e – Solution
  • Chris Webb on That Series That Lacks a Name but Equals 5e – Solution
  • Chris Webb on Ctype Functions: isblank() and isspace()

Meta

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

Copyright © 1997-2026 by QPBC.
All rights reserved

Proudly powered by WordPress