The following code has some really weird behavior:

When chosen = 0, it returns -1073741819.

When chosen = 1, it runs but the output strings are messed up.

```
#include <iostream>
#include <cstring>
using namespace std;

char* name[2] = {"WithoutSpaces","With spaces"};
struct entity{
    char* name;
};
struct entity *foo1, *foo2;

int main(void){
    foo1 = new entity;
    foo2 = new entity;
    int chosen = 1;

    foo1->name = new char[sizeof(name[chosen])+1];
    strcpy(foo1->name,name[chosen]);

    foo2->name = new char[sizeof(name[chosen])+1];
    strcpy(foo2->name,name[chosen]);

    cout << foo1->name <<endl;
    cout << foo2->name <<endl;
    return 0;
}

```

What is happening?