B
broeisi
Hello,
Can someone help me out with this one?
The following program should read characters till it met the EOF (-1)
on my pc.
I'm running linux and using the gcc compiler version 3.4.5.
But it doesn't.
Am I doing something wrong here?.
==============================================
#include <stdio.h>
int main(void)
{
char c;
printf("EOF has value: %d\n", EOF);
while((c = getchar()) != EOF)
putchar(c);
return 0;
}
===============================================
Can someone help me out with this one?
The following program should read characters till it met the EOF (-1)
on my pc.
I'm running linux and using the gcc compiler version 3.4.5.
But it doesn't.
Am I doing something wrong here?.
==============================================
#include <stdio.h>
int main(void)
{
char c;
printf("EOF has value: %d\n", EOF);
while((c = getchar()) != EOF)
putchar(c);
return 0;
}
===============================================