C Program Using String Manipulation Javascript