Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

To start reading file at specific byte number we use getw seekp, seekg findp tab

ID: 3812609 • Letter: T

Question

To start reading file at specific byte number we use getw seekp, seekg findp tabg If you attempt to open file for sequential access, and the file doesn't exist, what happens ? error file id created user is asked if file is to be created none of these When sequential access file is opened to write. Is default "replace" or "append" ? To open file as random access use the following syntax ios:: random ios:: text ios:: binary none needed, random access is the default, none of these is correct To start writing file at specific byte number we use getw seekp seekg findp

Explanation / Answer

20) Seekg is used to start reading file at a specific byte number. It allows you to seek arbitary position in file.

ANS: c)seekg

21)While accessing in sequence, processor thinks that there would be a location. and we also should keep in mind about remaining.It doesn't stop sequence and prompts user to be created.

Ans: C)

22)write - Opens the file as an empty file for writing. If the file already exists, contents are destroyed.

append - Opens the file for writing at the end of the file without removing. when file is opened to write by default it is append.

23) It opens files by random default. Hence there is no need to mention

Ans: d)

24) seekp is used to start writing a file at specific byte number.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote