Correct the following program and explain why it still prints a line of foo after invoking the
remove function.
#include
int main(void)
{
char buf[80];
FILE *fp = fopen(“foo”, ‘r’);
remove(“foo”);
fgets(fp, buf, 80);
fprintf(“%s\n”, buf, stdout);
return 0;
}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here