10.3 Files (3)

Resources | Revision Questions | Computer Science

Login to see all questions

Click on a question to view the answer

1.

Consider a text file where each line represents a word. Write pseudo-code to determine the frequency of each word in the file. Your pseudo-code should include steps to read the file, convert each word to lowercase, and store the word frequencies in a suitable data structure. The data structure should allow for efficient counting of occurrences.

2.

Describe the different types of file systems commonly used in operating systems. Compare and contrast at least two different file system types, highlighting their key characteristics, advantages, and disadvantages.

3.

Describe the different ways files can be accessed and manipulated by a computer program. Explain the roles of file pointers, file descriptors, and input/output (I/O) operations in this process.