adplus-dvertising
frame-decoration

Question

The first and second arguments of fopen() are

a.

A character string containing the name of the file & the second argument is the mode

b.

A character string containing the name of the user & the second argument is the mode

c.

A character string containing file pointer & the second argument is the mode

d.

None of the mentioned

Posted under C Programming

Answer: (a).A character string containing the name of the file & the second argument is the mode

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. The first and second arguments of fopen() are

Similar Questions

Discover Related MCQs

Q. fseek() should be preferred over rewind() mainly because

Q. FILE reserved word is?

Q. Which type of files can't be opened using fopen()?

Q. If there is any error while opening a file, fopen will return?

Q. It is not possible to combine two or more file opening mode in open () method.

Q. When fopen() is not able to open a file, it returns

Q. getc() returns EOF when

Q. A data of the file is stored in a

Q. Select a function which is used to write a string to a file.

Q. We should not read after a write to a file without an intervening call to fflush(), fseek() or rewind().

Q. Offset used in fseek() function call can be a negative number.

Q. stderr, stdin, stdout are FILE pointers.

Q. Which of the following is data type of file pointer?

Q. In fopen(), the open mode "wx" is sometimes preferred "w" because

1) Use of wx is more efficient.
2) If w is used, old contents of file are erased and a new empty file is created. When wx is used, fopen() returns NULL if file already exists.

Q. A file written in text mode can be read back in binary mode.

Q. A text stream is an ordered sequence of characters composed into lines, each line consisting of zero or more characters plus a terminating new-line character.

Q. While calling the fprintf() function in the format string conversion specifier %s can be used to write a character string in capital letters.

Q. Select text file in which number will take.

Q. Which is true about what getc returns?

Q. _____removes the named file, so that a subsequent attempt to open it will fail.