hi,

once again i hit a very simple problem i am unable to resolve. I using Visual Studio 2010, but am compiling for C.


THis:
Code:
	char i=45;
	while(i=getchar() != EOF)
	{

should imo work perfectly (yes, no real code, just to demonstrate the issue), but it doesnt. Getchar() always returns 0x01. Why is that?
This, in contrast, works perfectly fine:

Code:
	char i=45;

	while(i!= EOF)
	{
i=getchar();
Shouldnt an assignment always return the assigned value?