Using a `union`, we can certainly have an array containing elements of different data types.

e.g.

```
struct elements { 
    int s;
    union {
        int ival;
        float fval;
        char *pval;
    } element;
};
struct darray {
    struct elements items[100];
};

```

Now, we can declare an array which can contain elements of different data types:

```
struct darray a;

```

What is troubling me: Only a single member of a union can exist at a single time, but we have already got an array containing 100 elements. These elements aren't initialized, but shouldn't memory be allocated here?

How does memory allocation works in such arrays?