for (i = pa = 0; str[i] != '\0'; i++) {
  if (str[i] == ',') {
    prats[pa] = '\0';
  } else {
    prats[pa] = str[i];
  }
}