Dear all,
correct me where I am wrong.
EOF has no ASCII value.
It is a C defined constant of type int,with value -1.
consider the program
#include<stdio. h>
int main()
{
int c;
c=getchar();
while(c!=EOF)
{
putchar(c);
c=getchar();
}
// getch();
return(0);
}
how this program will terminate??(wil l it?)
correct me where I am wrong.
EOF has no ASCII value.
It is a C defined constant of type int,with value -1.
consider the program
#include<stdio. h>
int main()
{
int c;
c=getchar();
while(c!=EOF)
{
putchar(c);
c=getchar();
}
// getch();
return(0);
}
how this program will terminate??(wil l it?)
Comment