A function to do this conversion might look like this:
void my_bsq(char* txt, int** array, int* size)
{
int len= strlen(txt);
int* myarr = (int*)malloc(len * sizeof(int));
if (!myarr) {
*size = 0; return;
}
for (int i=0; i <len; i++) {
switch (txt[i]) {
case '.': myarr[i] = 1; break;
case 'o':