G
Gus Tabares
Hello,
I'm working through the K&R book but I can't seem to get over this
one little simple program:
#include <stdio.h>
main()
{
int c;
while((c = getchar()) != EOF)
{
putchar(c);
}
}
.....I am not able to terminate from this loop. In a previous program,
I printed the value of EOF as -1. When I enter -1 the loop still
continues. Is there something I'm missing here?
Thanks,
Gus
I'm working through the K&R book but I can't seem to get over this
one little simple program:
#include <stdio.h>
main()
{
int c;
while((c = getchar()) != EOF)
{
putchar(c);
}
}
.....I am not able to terminate from this loop. In a previous program,
I printed the value of EOF as -1. When I enter -1 the loop still
continues. Is there something I'm missing here?
Thanks,
Gus