とりあえず。

if (strcmp(a, "hoge") == 0) {
  hoge = x;
} else if (strcmp(a, "bar") == 0) {
  bar = x;
} else if ...

  :
  :

これをifを使わずに作りたいってこと?