adplus-dvertising
frame-decoration

Question

What is the output of this program in the text file?
    #include <stdio.h>
    int main ()
    {
        FILE * p;
        char buffer[] = { 'x' , 'y' , 'z' };
        p = fopen ( "myfile.txt" , "wb" );
        fwrite (buffer , 1 , sizeof(buffer) , p );
        fclose (p);
        return 0;
    }

a.

xyz

b.

zyx

c.

yxz

d.

none of the mentioned

Answer: (a).xyz

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 in the text file?

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