If you run your code in the debugger, and put a breakpoint in the first loop:
s[i] = c;
Then a quick look at your variables will show you the value of "c" is "1" - regardless of the key you press!
And then it's obvious: it's an operator precedence problem.
Because "Not Equals" has a higher priority than "Assignment" this part:
(c = getchar() != EOF)
Is evaluated to mean
If getchar() is not EOF assign "1" to "c", otherwise assign "0" to "c"
Rather than
Assign the value returned by getchar() to "c", and then check if it is an EOF
Just change the brackets from this:
for(i = 0; i < MAXLINE - 1 && (c = getchar() != EOF) && c != '\n'; i++)
To this:
for(i = 0; i < MAXLINE - 1 && (c = getchar()) != EOF && c != '\n'; i++)
And it'll work.