C Programming MCQ

1:

If a file is opened in r+ mode then

A.

reading is possible

B.

 writing is possible

C.

both (a) & (b)

D.

all the above comments are true

 

Answer : C

Explanation :

r+ - If is opened successfully fopen( ) loads it into memory and sets up a pointer which points to the first character in it. Returns NULL, if unable to open the file.Operations possible - reading existing contents, writing new contents, modifying existing contents of the file

r - Searches file. If the file is opened successfully fopen( ) loads it into memory and sets up a pointer which points to the first character in it. If the file cannot be opened fopen( ) returns NULL.

Operations possible – reading from the file.

 

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.