title: Can strings be used as an array index?
body: <p>Can a string be used as array index in C?</p>
  
  <p>Ex:
  String      Corresponding value
  "ONE"       1
  "TWO"       2
  "FIVE"      5
  "TEN"       10</p>
  
  <p>When a string in the above list is passed to the function, the function must return the corresponding value indicated above. Can this be achieved by declaring a constant array with string as index</p>
  
  <pre><code>int *x;
  x["ONE"]  = 1;
  x["TWO"]  = 2;
  x["FIVE"] = 5;
  x["TEN"]  = 5;
  
  return x["string received by the function"];
  </code></pre>
  
  <p>The above logic does not work as expected; is there a workaround to implement the above logic in order to have a string-indexed array?</p>