We will write a program which takes a file name from a user. If the file name provided by the user is empty (an empty string), the compiler will assign a default name to the file. If the file name provided by the user is not empty, the compiler will assign the user’s input to the file.