Im new to C programming and wanted to clear, what may seem to be, a silly doubt...
Code:
#define EOF 0
main()
{
int c;
c=getchar();
while (c!= EOF)
{
putchar (c);
c= getchar();
}
}
this should just return the value I enter...but accordingly...shouldnt it terminate when I enter 0? If not...what exactly does the statement under 'while' signify? Any help would be greatly appreciated guys :)