C low-level standard-in to accept filename then printing file contents to stdout
问题 I want to get a file name from a user via stdin, open the file with open() and assign it to a file descriptor, then print the contents of that file to stdout. This is my code, and it's not working properly. Problems: the printf("enter filename"); statement is never showing up it never opens the file; instead whatever the user inputs is printed to the screen and then the "no such file or directory" error message is printed and the program exits after the program exists i see "enter filename"