Question: C Programming c) You have been given two choices for opening a file as below: FILE *ap = fopen(cool, ab+); // choice a FILE *ap
C Programming

c) You have been given two choices for opening a file as below: FILE *ap = fopen("cool", "ab+"); // choice a FILE *ap = fopen("cool", "a"); // choice B and also, another two choices for writing the int variable y to the file: fprintf (ap, "%d ", v); fwrite(&y, sizeof(int), 1, ap); // choice c // choice D i) State your combination of choices for opening the file and writing to the file are appropriate to be used together. Justify your answer. [3 marks] ii) Describe one advantage for each choice of writing y to the file. [3 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
