Lecture overview -- Keyboard shortcut: 'u'  Previous page: Structures and Unions -- Keyboard shortcut: 'p'  Next page: Function types -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    From C to C++ - slide 17 : 29

Structures: Examples
Some C programs that illustrate structs in C
struct-1.c
C program with a couple of structs.
struct-1-output
Program output.
struct-2.c
A move_person function with structs parameters - does not work.
struct-2-output
Program output.
struct-3.c
A move_person function with structs parameters - now better.
struct-3-output
Program output.
Go to exercise
Functions with struct input and struct output
Go to exercise
Specialization of persons with a union type
bit-field-ex.c
A program that illustrates a struct with bit fields.
bit-field-output
Program output.