adplus-dvertising
frame-decoration

Question

How many number of characters are available in newname.txt?
    #include <stdio.h>
    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", n);
            }
            else
                puts ("End-of-File was not reached.");
            fclose (p);
        }
        return 0;
    }

a.

10

b.

15

c.

Depends on the text file

d.

None of the mentioned

Answer: (c).Depends on the text file

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. How many number of characters are available in newname.txt?

Similar Questions

Discover Related MCQs

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

Q. Which of the following mathematical function is overloaded in <complex>

Q. How many parameters are used in frexp function?

Q. Which of the following library is used to do vector arithmetic?

Q. Which header file is used to manipulate the vector algebra in c++?

Q. What type of reference should be used in vector arithmetic?

Q. What will be the type of output of vector cross product?

Q. Which function is used to optimize the space in vector?

Q. What is the use of vector arithmetic in c++?

Q. Which header file is used to operate on numeric sequences?

Q. Which mathematics library is used for vector manipulation in c++?