Structs
struct tod {
int hours;
int minutes;
}
Initialize fully: struct tod now = {16, 50}
Initialize partially: struct tod later = {.hours = 40}
Warning
Note that Pointers in structs are NOT automatically initialized to NULL
Like other languages, you can use dot notation
void todPrint(struct tod when) {
printf("%0.2d:%0.2d\n", when.hours, when.minutes);
}
int main() {
later.minutes = 420;
todPrint(now); // NOTE: A COPY IS PASSED
}