adplus-dvertising
frame-decoration

Question

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

a.

10

b.

20

c.

5

d.

Depends upon the file

Answer: (d).Depends upon the file

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. By using which function does the buffer are automatically flushed?

Q. How many parameters are available in the function setbuf?

Q. What is the main feature of locale in C++?

Q. Which objects information is loaded in locale object?

Q. How many categories are available in facets?

Q. What kind of locale does every program is having in C++?

Q. What will the monetary facet will do?

Q. Which header file is used with input and output operations of C in C++?

Q. Which will be used with physical devices to interact from C++ program?

Q. How many streams are automatically created when executing a program?

Q. How many indicators are available in c++?

Q. What is the benefit of c++ input and output over c input and output?

Q. To which type does the numeric limits are suitable?

Q. Where does the member should be defined if it is used in the program?

Q. What will the max function in the numeric limit will return for type float?

Q. Which header file is used for the numeric limits in C++?

Q. Pick out the incorrect static function member in numeric limits.

Q. With which does the trigonometric functions work with angles in c++?

Q. Which header file is required for manipulation of math functions in c++?

Q. How many macros are used by mathematical functions in the header file