| structures/baby-mother-father-struct.c - Introduktion af structures - med structure initializers. | Lektion 12 - slide 7 : 36 Program 3 |
#include <stdio.h>
typedef unsigned long int CPR;
struct person {
char *name;
CPR cpr, father_cpr, mother_cpr;
};
int main(void) {
struct person
baby = {"Paul", 2304031577, 1605571233, 2412671234},
mother = {"Anna", 2412671234, 1605376789, 1201402468},
father = {"Frank", 1605571233, 1111331357, 1212358642};
printf("%s's mother and father is %s and %s\n",
baby.name, mother.name, father.name);
return 0;
}