Thanks DaWei.

I have tried using the gcc compiler from command prompt and it worked, except a console of window appears along with that window at the same time when the program is executed.