7.6 Records and Files Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the important steps to change the contents of a file?

A
  • Open the file
  • Read/write to the file
  • Close the file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a data structure?

A

A collection of elementary data types such as integer, real, Boolean, char or string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Array data structure

A

Can hold items of an identical type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Record data structure

A

A data structure consisting of a number of fields which can all be of different types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a field?

A

A single tiem of data in a record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a file?

A

A data structure that can store a collection of records

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 3 modes a file can be opened in?

A
  • Write mode
  • Append mode
  • Read mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Write mode

A

Allows writing to a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Append mode

A

Allows more data to be added to a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Read mode

A

Only allows the file to be read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What needs to be assigned to the identifier for the file to be used in the program?

A
  • Actual file name

- Path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly