D
Darklight
i wrote this program to day for the answer to
ex 1-7 write a program to print the value of EOF
ANS =
#include<stdio.h>
int main(void)
{
int c;
printf("EOF is %d\n",EOF);
while ((c = getchar()) != EOF)
printf("%c %d\n",c,EOF);
putchar(c);
}
the answer i get is -1 is this the correct answer to the question the
question came from c programming kernighan and ritchie
ex 1-7 write a program to print the value of EOF
ANS =
#include<stdio.h>
int main(void)
{
int c;
printf("EOF is %d\n",EOF);
while ((c = getchar()) != EOF)
printf("%c %d\n",c,EOF);
putchar(c);
}
the answer i get is -1 is this the correct answer to the question the
question came from c programming kernighan and ritchie