いい加減な直し方ですまない。なるべくそのままで直した。

  scanf("%s%c", data[i].name);
  scanf("%d%c", &data[i].old);
  scanf("%c%c", &data[i].sex);