1.

What is the output of this program?
#include <iostream>
int main ()
{
FILE * ptr;
long size;
ptr = fopen ("Example.txt", "rb");
if (ptr == NULL)
perror ("Error opening file");
else
{
fseek (ptr, 0, SEEK_END);
size = ftell (ptr);
fclose (ptr);
printf (" %ld n", size);
}
return 0;
}

A. Depends upon the file
B. 50
C. 100
D. 20
E. None of these
Answer» B. 50


Discussion

No Comment Found

Related MCQs