Skip to primary content
Skip to secondary content

C For Dummies Blog

Main menu

  • C For Dummies (home)
  • History
  • Series
  • Supplemental
  • Blog Miscellany

Category Archives: Lesson

Post navigation

← Older posts
Newer posts →

Conversion Character Abuse

Posted on September 14, 2013 by dgookin
Reply

The printf() function is most concerned with getting the number of conversion characters — the % placeholders — to match the number of variables specified. Beyond that, it’s rather ambivalent as to whether the types match properly.
Continue reading →

Posted in Lesson | Leave a reply

The C Variable Myth

Posted on September 7, 2013 by dgookin
Reply

A variable in C is a myth. Oh, yeah, it’s a location in memory. That’s pretty much it. After declaring the variable, the compiler — and you, the programmer — pretty much rely upon faith that the variable works and can actually be useful.
Continue reading →

Posted in Lesson | Leave a reply

The Month Array

Posted on August 31, 2013 by dgookin
Reply

Why present the current date as 8/31/2013 when you can express it as August 31, 2013? Because some things are easy to program and some are easy for the program’s user to read.
Continue reading →

Posted in Lesson | Leave a reply

Why Not Float All the Time?

Posted on August 24, 2013 by dgookin
Reply

What’s the point of using integers when you could simply code programs using floating-point values all the time to always get the best results? The reason is a good one, but it takes some explaining.
Continue reading →

Posted in Lesson | Leave a reply

Unique Random Numbers

Posted on August 17, 2013 by dgookin
Reply

The goal is to write code that generates random numbers, but never the same value twice. After all, if you’re coding a card game or generating lotto picks, it’s unrealistic to expect the same value appear multiple times.
Continue reading →

Posted in Lesson | Leave a reply

Pick a Card, Any Card

Posted on August 10, 2013 by dgookin
Reply

Last week’s Lesson discussed how to monitor random numbers by using an array: When a random value is drawn, it’s corresponding array element is incremented. By continuing that same thought, you can easily ensure that the same random number isn’t used when programming a card game. But first, the game itself!
Continue reading →

Posted in Lesson | Leave a reply

Never the Same Number Twice

Posted on August 3, 2013 by dgookin
Reply

One of the most common questions I get from my For Dummies programming titles is regarding the lotto programs. That code demonstrates how you can randomly draw lotto balls without drawing the same ball twice.
Continue reading →

Posted in Lesson | Leave a reply

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

Post navigation

← Older posts
Newer posts →

Recent Posts

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

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