added C code

I am having a few issues with the classes and basic functions such as
math.h, string.h, they are predefined in C++ but not in this code I need
ways around it