Vidyalelo
C++ Programming · Q484

C++ miscellaneous

Programming · C++ Programming · question 484

Q484

How are many number of characters available in newname.txt? #include int main () FILE * p; int n = 0; p = fopen ("newname.txt", "rb"); if (p == NULL) perror ("Error opening file"); else while (fgetc(p) != EOF) ++n; if (feof(p)) printf ("%d ", n); else puts ("End-of-File was not reached."); fclose (p); return 0;

A.
10
B.
15
C.
Depends on the text file
Answer
D.
34

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board