• Home
  • Textbooks
  • Starting Out with Programming Logic and Design
  • Files

Starting Out with Programming Logic and Design

Tony Gaddis

Chapter 10

Files - all with Video Answers

Educators


Chapter Questions

01:03

Problem 1

Where are files normally stored?

rb
Rabia Bibi
Numerade Educator
01:07

Problem 2

What is an output file?

Sanchit Jain
Sanchit Jain
Numerade Educator
01:02

Problem 3

What is an input file?

Sanchit Jain
Sanchit Jain
Numerade Educator
01:10

Problem 4

What three steps must be taken by a program when it uses a file?

Adam Conner
Adam Conner
Numerade Educator
03:45

Problem 5

In general, what are the two types of files? What is the difference between these two types of files?

Foster Wisusik
Foster Wisusik
Numerade Educator
03:45

Problem 6

What are the two types of file access? What is the difference between these two?

Foster Wisusik
Foster Wisusik
Numerade Educator
02:01

Problem 7

When writing a program that performs an operation on a file, what two fileassociated names do you have to work with in your code?

Adam Conner
Adam Conner
Numerade Educator
01:43

Problem 8

In most programming languages, if a file already exists what happens to it if you try to open it as an output file?

Adam Conner
Adam Conner
Numerade Educator
03:21

Problem 9

What is the purpose of opening a file?

RO
Reynald Oliveria
Numerade Educator
03:21

Problem 10

What is the purpose of closing a file?

RO
Reynald Oliveria
Numerade Educator
01:49

Problem 11

Generally speaking, what is a delimiter? How are delimiters typically used in files?

Adam Conner
Adam Conner
Numerade Educator
03:21

Problem 12

In many systems, what is written at the end of a file?

RO
Reynald Oliveria
Numerade Educator
01:56

Problem 13

What is a file's read position? Initially, where is the read position when an input file is opened?

Rashmi Sinha
Rashmi Sinha
Numerade Educator
02:50

Problem 14

In what mode do you open a file if you want to write data to it, but you do not want to erase the file's existing contents? When you write data to such a file, to what part of the file is the data written?

Foster Wisusik
Foster Wisusik
Numerade Educator
05:46

Problem 15

Design an algorithm that uses a For loop to write the numbers 1 through 10 to a file.

Tarandeep Singh
Tarandeep Singh
Numerade Educator
03:21

Problem 16

What is the purpose of the eof function?

RO
Reynald Oliveria
Numerade Educator
03:21

Problem 17

Is it acceptable for a program to attempt to read beyond the end of a file?

RO
Reynald Oliveria
Numerade Educator
01:17

Problem 18

What would it mean if the expression eof(myrile) were to return True?

Vysakh M
Vysakh M
Numerade Educator
01:53

Problem 19

Which of the following loops would you use to read all of the items from the file associated with myPile?
a. While eof (mypile) Read myrile item End While
b. While NOT eof (myFile) Read myFile item End While

Foster Wisusik
Foster Wisusik
Numerade Educator
01:03

Problem 20

What is a record? What is a field?

Narayan Hari
Narayan Hari
Numerade Educator
02:46

Problem 21

Describe the way that you use a temporary file in a program that modifies a record in a sequential access file.

James Kiss
James Kiss
Numerade Educator
02:49

Problem 22

Describe the way that you use a temporary file in a program that deletes a record from a sequential file.

Joe Mallonee
Joe Mallonee
Numerade Educator