Riiiight!. Your compiler is broken. Make sure you return it for a refund ;)
Just joking.
If anything your program would display:
because that would be argv[0], argv[1] and argv[2].
However that's not the case, since the < is a selected operator by the shell. So any thing after that doesn't count as argument for main.
The point is that it would never display the content of the file t0 that you are passing.
Try:
Code:
#include <stdio.h>
int main ( void )
{
char buf[BUFSIZ];
while( fgets( buf, sizeof buf, stdin ) )
{
printf( "%s", buf );
}
return 0;
}
and see what happens.