Assignment 4
Read Das chapter 17 and the notes on
Date/Time basics.
- Answer the self-test questions at the end of chapter 17.
- Do exercise 17.3 two ways - with low-level I/O and high-level
I/O routines.
- Do exercises 17.4 and 17.5.
- Do the following Self-Tests. What were your scores?
-
Molay, chapter 2 Self-test.
-
Molay, chapter 3 Self-test.
-
Molay, chapter 4 Self-test.
- Calculate the latest time that can be represented by the
time_t data type. After it wraps around, what happens?
- Write a program to obtain the current time and print it using
strftime, so that it looks like the default output from
date (in man section 1). Set the TZ environment variable
to different values and see what happens.
- The following code works conrrectly on some machines, but not on
others. What could be the problem?
#include <stdio.h>
int main()
{
char c;
while (( c = getchar()) != EOF)
putchar(c);
}
- What does a return value of 0 from
printf mean?
Maintained by John Loomis,
last updated 18 September 2006