The ........... function is used to read a single character from a file.
A.fgetc()
B.fgets()
C.fget()
D.fgetf()
Answers
=============
Option C :-
is the correct answer.....
Answer:
The function that is used to read a character from a file is fgetc()
Explanation:
fgetc():
The function fgetc() is utilized to peruse the person from the document. It returns the person pointed by record pointer, if fruitful in any case, returns EOF.
Here is the punctuation of fgetc() in C language,
int fgetc(FILE *stream)
Here is an illustration of fgetc() in C language,
Suppose we have "new.txt" record with the accompanying substance −
0.hello
1.hello!
2.demo
Presently, let us see the model −
Example:
#include<stdio.h>
#include<conio.h>
void main() {
FILE *f;
char s;
clrscr();
f=fopen("new.txt","r");
while((s=fgetc(f))!=EOF) {
printf("%c",s);
}
fclose(f);
getch();
}
Here is the output,
Output
0.hello
1.hello!
2.demo
To know more about pogramming languages visit the links given below:
https://brainly.in/question/642838
https://brainly.in/question/49226052