****What is wrong or problematic with this Function****

Thanks a ton for the suggestions. Used the MemoryFree.h file and I noticed that I was very low on mem. I implemented the PROGMEM routine and it seems to have solved the issue.

Now I need to do this at several other locations in the code.