PRF192_-_SP_2023_-_RE_-_s_1_121.webp
I

PRF192_-_SP_2023_-_RE_-_s_1_121.webp

Multiple Choices
Answer (Choose 1 answer)
FILE *fp = NULL;
fp = fopen("alpha.txt","w");
if (fp != NULL) {
fprintf(fp, "%s", "We are the world!");
fclose(fp);
} else
printf("Failed to open file");
The above code is the correct structure to:
A. (1) connect to file, (2) open the file to write data, (3) write data to file, and (4) close the file.
B. (1) connect to file, (2) open the file to read data, (3) read from file, and (4) close the file.
C. (1) connect to file, (2) open the file to read and write data, (3) write data to file, and (4) close the file.
D. (1) connect to file, (2) write data to file, (3)open the file to write data, and (4) close the file.

Thông tin

Category
PRF192
Thêm bởi
Inumaki871
Ngày thêm
Lượt xem
1,227
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom