I am trying to redirect standard input to be a file, unfortunately I have not been succesful.

My command in unix to execute my c applicacion is:

a.out < file.something

However, I receive a segmentation error.

my c code to read that standard in is here:
void input()
 char s[1];
 printf("Contents %c", s[1]);

Last edited by shabbir; 30Jan2007 at 14:24.. Reason: Code formating.