Feb 22 C
I browsed Chapter 2 in "21st century C" about debuggers - it was interesting and the exposure was good, but it was definitely not at my level (no surprise there).
Finished Chapter 2 of K. N. King - This book is super excellent: it explains everything plainly and is very explicit when hands are about to be waved. K&R is a decent tutorial, but just plain skips over a lot of important things. King's book is probably the best programming textbook I've seen so far (which isn't saying that much, of course).
Ch. 2, Programming Projects 8: Write a program that calculates the remaining balance on a loan after the first, second and third monthly payments is below.
Things are going slower than I might have expected, but I think I'm finally understanding some of the basic C stuff. Yey!
= in class
/*
* talking about & and *
*
*/
#include <stdio.h>
int main(){
// memory:
// address value
// number1 4.0
// number2 10.2
//
// formats:
// %f floating point
// %p pointer
// %u unsigned integer
double number1 = 4.0;
double number2 = 10.2;
printf("The value of number1 is %f\n", number1);
printf("The address of number1 is %p\n", &number1);
printf("The address of number2 is %p\n", &number2);
printf("The size in bytes of number1 is %u \n", sizeof(number1));
printf("The size in bytes of number2 is %u \n", sizeof(number2));
return 0;
}