A copied record owns its embedded character array

Give the exact output and draw the fields of a and b immediately after initialization and after both edits. Explain what typedef contributes, why a struct is useful for grouping a code, label and count, and why changing b.label does not change a.label. Contrast Bin b=a; with the later expression b=a;, and then with attempting a.label=b.label; as a direct assignment between arrays.

#include <stdio.h>
typedef struct {
    int code;
    char label[8];
    int units;
} Bin;
int main(void) {
    Bin a = {4, "pen", 3};
    Bin b = a;
    b.units += 2;
    b.label[0] = 'h';
    printf("a=%d %s %d\n", a.code, a.label, a.units);
    printf("b=%d %s %d\n", b.code, b.label, b.units);
    return 0;
}

