Can anyone tell me how to map strings with integers in ‘C’ programming language?
for example : the strings taken from the input from the user are SUM , DAM , PEN ,PUT ,VAN.
we need to map like this : SUM - 1;
DAM -2;
PEN - 3;
PUT - 4;
VAN -5;
those strings are to be taken from the user input.
for java ou can look here http://tutorials.jenkov.com/java-collections/map.html but for C you’ll have to implement your own hash table datastructure. this is why C++ and java are most common in programming contests. most important and frequently used data structures are already provided in the standard library.