As you say, this is for fun, so you don't have to take it so seriously, hence you just need to make it recognisably C. For example:
Code:
struct baby *expecting(void) {
delay(23587200);
size_t n = 1 + random(MAX_CHILDREN);
struct baby *babies = malloc(n * sizeof(*babies));
for (size_t i = 0; i < n; i++) {
switch (random(3)) {
case 0:
babies[i].sex = GIRL;
strcpy(babies[i].name, GIRL_NAMES[random(GIRL_NAMES_COUNT)]);
break;
case 1:
babies[i].sex = BOY;
strcpy(babies[i].name, BOY_NAMES[random(BOY_NAMES_COUNT)]);
break;
}
}
return babies;
}
The use of void as the parameter list, the use of struct baby rather than just baby, along with the malloc call, all these signal to a reader who knows C that this is likely to be a C (rather than say, C++) function, despite neither delay nor random being part of standard C. Sure, in real code we should check the return value of malloc and be wary about whether this use of strcpy might allow for buffer overflow vulnerability at some point, but that will just clutter the code snippet.
I would just omit the name thing because it doesn't add any value to this unless you have a small set of names in mind so that you can declare the names for flavour. But then you may run into the minefield of diversity in name selection. The sex vs gender thing is another minefield: I picked "sex" because it is shorter and omitted "unknown" because this is just an example, but you're going to have to navigate the sex vs gender minefield yourself, e.g., what is an "unknown" sex? Is it intersex? What is an "unknown" gender? Are the genders of all babies unknown, or are they always provisionally known due to the interpretation of people around them, etc? Consequently, you may find it easier for T-shirt purposes to omit this and say, just loop to pick random names from a pre-defined list that is not shown or something.