hi everyone.....I am having a confusion with the implementation of condition of a while loop expression.Suppose the code
Here although I have found out that that 0 means FALSE and 1 or any nonzero number means TRUE.Code:while(!feof(fp)) { printf("%c",ch); fscanf(fp,"%c",&ch); }
So if the condition is 1 the loop executes and if the loop is 0 the loop terminates.
So upto this much i could understand.
Now as we know feof returns a nonzero no. if all the characters of a file has been read else it returns 0.
So how its interpreted here by the compiler??
I mean if it is feof() is 0 then it makes it nonzero using the ! operator but what about when feof() is nonzero, whether !(nonzero number)=0?