Saturday, December 17, 2011

More Operators


Hour 8 - More Operators
Civilization advances by extending the number of important operations we can perform without thinking about them.
—A. N. Whitehead
In Hour 6, "Manipulating Data with Operators," you learned about some important operators in C, such as the arithmetic assignment operators, the unary minus operator, the increment and decrement operators, and the relational operators. In this lesson you'll learn about more operators, including
  • The sizeof operator
  • Logical operators
  • Bit-manipulation operators
  • The conditional operator

Tuesday, December 13, 2011

Doing the Same Thing Over and Over

Hour 7 - Doing the Same Thing Over and Over
Heaven and earth:
Unheard sutra chanting
Repeated…
-Zen saying
In the previous lessons, you've learned the basics of the C program, several important C functions, standard I/O, and some useful operators. In this lesson you'll learn a very important feature of the C language-looping. Looping, also called iteration, is used in programming to perform the same set of statements over and over until certain specified conditions are met.
Three statements in C are designed for looping:
"    The for statement

Manipulating Data with Operators

Hour 6 - Manipulating Data with Operators
"The question is," said Humpty Dumpty, "which is to be master-that's all."
-L. Carroll
You can think of operators as verbs in C that let you manipulate data. In fact, you've learned some operators, such as + (addition), - (subtraction), * (multiplication), / (division), and % (remainder), in Hour 3, "The Essentials of C Programs." The C language has a rich set of operators. In this hour, you'll learn about more operators, such as
"    Arithmetic assignment operators

Reading from and Writing to Standard I/O


Hour 5 - Reading from and Writing to Standard I/O
I/O, I/O, it's off to work we go…
–The Seven Dwarfs (sort of)
In the last lesson you learned how to print out characters, integers, and floating-point numbers to the screen by calling the printf() function. In this lesson you're going to learn more about printf(), as well as about the following functions, which are necessary to receive the input from the user or print the output to the screen:
  • The getc() function
  • The putc() function

Data Types and Names in C


Hour 4 - Data Types and Names in C
What's in a name? That which we call a rose
By any other name would smell as sweet.
—W. Shakespeare
You learned how to make a valid name for a C function in Hour 3, "The Essentials of C Programs." Now, you're going to learn more about naming a variable and the C keywords reserved by the C compiler in this hour.
Also in this hour you're going to learn about the four data types of the C language in detail: