You should use the scanf to take the input as filename and use the fopen to open the file and fread to read the file and display it to the user.