fork download
  1. #include <stdio.h>
  2.  
  3. /* esta função de hash() e muito basica. NAO USAR! */
  4. int hash(const char *index) {
  5. return *index == 'e';
  6. }
  7.  
  8. int main(void) {
  9. int vetor[2] = {11, 10};
  10.  
  11. printf("eu ==> %d\n", vetor[hash("eu")]);
  12. printf("voce ==> %d\n", vetor[hash("voce")]);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
eu ==> 10
voce ==> 11