Step 1: Understand linear list based directory structure.
In a linear list based directory, file entries are stored sequentially without indexing or hashing. Hence, operations that require checking all existing file names may need a complete traversal of the directory.
Step 2: Analyse creation of a new file.
While creating a new file, the system must ensure that no file with the same name already exists in \texttt{foo}. Since the directory is a linear list, this uniqueness check necessarily requires scanning all entries. Hence, a full scan is required.
Step 3: Analyse renaming of an existing file.
Renaming a file also requires checking that the new name does not clash with any other file name in the directory. This again requires comparing the new name against all directory entries, which necessitates a full scan.
Step 4: Eliminate other options.
Option (B): Deletion requires locating the file, but once found, the operation can be completed without scanning the entire directory.
Option (D): Opening a file only requires finding its entry, which may occur before reaching the end of the list, so a full scan is not mandatory.
Step 5: Conclusion.
Therefore, the operations that necessarily require a full scan of directory \texttt{foo} are creation of a new file and renaming of an existing file.
In a 4-bit ripple counter, if the period of the waveform at the last flip-flop is 64 microseconds, then the frequency of the ripple counter in kHz is ______________. {(Answer in integer)}
Consider the following C code segment:
int x = 126, y = 105;
do {
if (x > y)
x = x - y;
else
y = y - x;
} while (x != y);
printf("%d", x);
The output of the given C code segment is ____________. (Answer in integer)
The following two signed 2’s complement numbers (multiplicand \( M \) and multiplier \( Q \)) are being multiplied using Booth’s algorithm:
| Multiplicand (\( M \)) | Multiplier (\( Q \)) |
|---|---|
| 1100 1101 1110 1101 | 1010 0100 1010 1010 |
The total number of addition and subtraction operations to be performed is __________. (Answer in integer)
The maximum value of \(x\) such that the edge between the nodes B and C is included in every minimum spanning tree of the given graph is __________ (answer in integer).
Consider the following C program
The value printed by the given C program is __________ (Answer in integer).