C program to create a file and write in it