#include <stdio.h>
/* esta função de hash() e muito basica. NAO USAR! */
int hash(const char *index) {
return *index == 'e';
}
int main(void) {
int vetor[2] = {11, 10};
printf("eu ==> %d\n", vetor
[hash
("eu")]); printf("voce ==> %d\n", vetor
[hash
("voce")]); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgovKiBlc3RhIGZ1bsOnw6NvIGRlIGhhc2goKSBlIG11aXRvIGJhc2ljYS4gTkFPIFVTQVIhICovCmludCBoYXNoKGNvbnN0IGNoYXIgKmluZGV4KSB7CiAgICByZXR1cm4gKmluZGV4ID09ICdlJzsKfQoKaW50IG1haW4odm9pZCkgewogICAgaW50IHZldG9yWzJdID0gezExLCAxMH07CgogICAgcHJpbnRmKCJldSA9PT4gJWRcbiIsIHZldG9yW2hhc2goImV1IildKTsKICAgIHByaW50Zigidm9jZSA9PT4gJWRcbiIsIHZldG9yW2hhc2goInZvY2UiKV0pOwogICAgcmV0dXJuIDA7Cn0K