#include<stdio.h>
int main()
{
char c;
while((c=getchar()!=EOF))
{
putchar(c);//
}
}
Every character of the output is displaced by '' these sorts of things.
Your parentheses are wrong so c gets assigned the value of the condition, which is 0 or 1 (false or true).
What you have now is the same as c = (getchar() != EOF) because of operator precedence.
Also, use the correct type for c, which is int:
#include<stdio.h>
int main()
{
int c;
while( (c = getchar()) != EOF )
{
putchar(c);//
}
}