Question
Easy

In C file handling equivalent to scanf("%d",&val); is:

1
fscanf(stdin, "%d",&val);
2
fprintf(stdout, "value=%d\n", val)
3
scanf(value)
4
scanf()
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Python Programming Fundamentals
Topic: Input/Output & Debugging
Correct Answer
Option A
Explanation

The correct option is (1): The fundamental difference between the standard console I/O functions and the file I/O functions in C is that the file functions require an explicit stream pointer. The scanf() function is, in fact, a specialized version of the file input function fscanf(). While scanf("%d",&val); is used to read formatted input from the console, its true equivalent in the file-handling family is fscanf(stdin, "%d",&val);. Here, stdin is…Read More