Question
(11) Why do you have to call fclose()? (12) Why do you have to call FindClose()? (13) If you try to read 1000 bytes from
(11) Why do you have to call fclose()? (12) Why do you have to call FindClose()? (13) If you try to read 1000 bytes from a file using fread() but the file only contains 100 bytes, describe what will happen with the fread() call. (14) If you use fread to read 100 bytes at a time from a file that contains 1000 bytes, how many calls to fread would it take before you could tell that you were at the end of the file? (15) What is the difference between a text file and a binary file? (16) What function would you likely use to read from a binary file? What function would you likely use to read from a text file? (17) If you use fgets() to read a line in from a text file and the input does not have a ' ' in it, what do you know about the input that the user has entered? (18) If you have 10 lines of text in a text file, how many '\0' characters would you likely find contained within the contents of the file? (19) Why is the answer not 10? (Hint: the answer isn't 9 or 11, either.) (20) Write a line of code that uses calloc() to allocate a block that can contain an array of 10 struct Parts. Assume that you have a variable called pBlock that is declared appropriately. (21) Declare the pBlock variable from the previous question. (22) Describe the criteria for how to split up a 100,000 line program into multiple files? (23) Describe how the bitwise-AND operator can be used to determine if a file has a particular attribute.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started