Question: Please answer 1 - 2 0 based on the image. Q - 0 1 * The FILE structure contains information that allows a program to

Please answer 1-20 based on the image.
Q-01
*
The FILE structure contains information that allows a program to refer to a file for read and write operations using a pointer. Which line creates a File structure pointer?
30
21
10
12
Q-02
*
Which line creates the actual File structure object in memory (hint - successful open operation)
12
10
22
39
Q-03
*
The 'fopen' function opens or creates a file in the default folder (line 12)- what is the default folder in CodeBlocks?
The Release folder
The object folder
The source code folder
The include folder
Q-04
*
The 'fopen' function parameter "w+" creates a file even if one already exists?
True
False
Q-05
*
Which 'fopen' function parameter would specify to append to the existing file?
"r+"
"w"
"w+"
"a"
Q-06
*
If "C:\MyDocuments\Temp\file.txt" is used as the first parameter in 'fopen' function, which folder is the parent folder?
file.txt
Temp
MyDocuments
C:\
Q-07
*
Is Line 14 Text or Binary file output?
Text
Binary
Q-08
*
Is Line 15 Text or Binary file output?
Text
Binary
Q-09
*
How could Text and/or Binary file I/O be used within the same file? Because all I/O for a file is strictly based on what unit?
integer
block
byte
binary
Q-10
*
Lines 21-27 print item (1.), single characters from "file.txt" with what outcome?
first string
second string
whole file
255 chars
Q-11
*
What stops the read operation in Lines 21-27
End-of-String
End-of-File
c==0
fp=NULL
Q-12
*
Lines 31-32 print item (2.). What stops the read operation?
End-of-String
End-of-File
Fgets second parameter
47 chars
Q-13
*
Line 34 'fseek' is relative to what part of the file?
Beginning
Current
End
Unspecified
Q-14
*
Line 34 has the same effect as which other line?
10 FILE pointer
12 fopen
23 feof
29 rewind
Q-15
*
Lines 36-37 print item (3.)- What stops the read operation?
End-of-String
End-of-File
Fgets second parameter -10
47 chars
Q-16
*
Lines 36-37- How many chars appear in the output (Item 3.- stdout)
47
9
255
8
Q-17
*
Line 41 is Text or Binary file input?
Text
Binary
Q-18
*
Line 41 how many characters is 'fread' trying to input?
255
47
EoS
EoF
Q-19
*
Lines 40-42(item 4.)- What stops the read operation?
End-of-String
End-of-File
fgets second parameter
47 chars
Q-20
*
Lines 40-42 print item (4.) How is the value of 'Length' determined?.....fread returns the number of ??? items input
fp
255
block
sizeof(char)
 Please answer 1-20 based on the image. Q-01 * The FILE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!