In the statement fseek (fPtr, (account – 1) * sizeof(struct clientDat , SEEK_SET
ID: 3703652 • Letter: I
Question
In the statement fseek (fPtr, (account – 1) * sizeof(struct clientDat , SEEK_SET);
Question 12 options:
A) why are we adjusting account by –1?
B) Because the account numbers start at 0 and the file starts at position 0.
C) Because the account numbers start at 0 and the file starts at position 1.
D) Because the account numbers start at 1 and the file starts at position 0.
E) Because the account numbers start at 1 and the file starts at position 1.
A) why are we adjusting account by –1?
B) Because the account numbers start at 0 and the file starts at position 0.
C) Because the account numbers start at 0 and the file starts at position 1.
D) Because the account numbers start at 1 and the file starts at position 0.
E) Because the account numbers start at 1 and the file starts at position 1.
Explanation / Answer
Answer: D) Because the account numbers start at 1 and the file starts at position 0.
In the statement fseek (fPtr, (account – 1) * sizeof(struct clientDat , SEEK_SET);
we are adjusting account by –1 Because the account numbers start at 1 and the file starts at position 0.