My curiousity got the best of me so here is the output from my execution of the program.
Code:
singular : light
plural : lights
definition: provides the ability to see
light,lights(pl) - provides the ability to see
Search : light
- - - - - - - - - -
light, (pl) - provides the ability to see
- - - - - - - - - -
light, (pl) - provides the ability to see
The first output was echoed during the add function. The last was output during the search function. The program seems to have worked as advertised for me. I didn't see any issues with the strncmp call not working or the code executing within multiple if..elseif blocks. I'm only looking for the problem originally described by the OP and am not going to critique the code in any way. So for what it's worth....