That is going to read the file name
and put it in your standard input, not in the first argument.
You can read it using fgets
, getchar
, scanf
, etc.
The equivalent:
int c;
printf("Hello ");
while((c = getchar()) != EOF) {
putchar(c);
}
puts("\nthere");