akshitha Akki wrote: -- this line creates a file if that does not exists already?
Yes.
akshitha Akki wrote: -- since path is not provided where will the file gets stored by default?
In the current directory (the directory that is the current directory) when you run the program.
CodeRanch forum tip: Please
UseCodeTags when you post source code, so that your code is formatted nicely as you can see above. (I added the code tags for you above).