0
What will be the output of the code if input.txt contains 42?
#include <stdio.h>
int main() {
FILE *file = fopen("input.txt", "r");
int value;
fscanf(file, "%d", &value);
fseek(file, 0, SEEK_SET);
fscanf(file, "%d", &value);
fclose(file);
printf("%d\n", value);
return 0;
}- AUndefined behavior
- B42
- CEOF
- DIt depends on the system
Correct answer: B