It's probably in your while (status != EOF || status2 != EOF)
statement.
That ||
should be an &&
.
Oh yeah, don't int main(void)
.
Always use either:
1. int main()
2. int main( int argc, char *argv[] )
Main takes arguments. If you want to ignore them, use form 1 (which says to the compiler: "I don't care about any arguments this function takes.")
Jishnu
"a.out" is the default executable name that compilers produce on *nix systems. On Windows you compile "foo.c" and get "foo.exe". On Unix you compile and get "a.out".