Chp 10 Flashcards

(23 cards)

1
Q

What’s a data type

A

A classification attributed to an item of data which determines the type of value it can take and how it can be used

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

What’s an identifier

A

A unique name applied to an item of data

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

What’s a record

A

It’s a composite data type comprising several related items that may be of different data types

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

What’s a composite data type

A

A data type constructed using several of the data types available in a particular programming language

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

Whats an array

A

A data structure containing several elements of the same data type

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

What’s an index

A

A numerical indicator of an item of data’s position in an array

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

What’s linear search

A

A method of searching in which each element of an array is checked in order to

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

What’s bubble sort

A

A method of sorting data in an array into alphabetical or numerical order by comparing adjacent items and swapping them if they are in the wrong order

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

What’s a file

A

A collection of data stored by a computer program to be used again

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

What’s ABT abstract data type

A

A collection of data and a set of operations on that data

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

What’s a stack

A

A list containing several items operating on the last in, first out (LIFO) principal

items can be added to the stack (push) and removed from the stack (pop).

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

What’s a queue

A

A list containing several items operating in the first in first out (FIFO) principle

items can be added to the queue (enqueue) and removed from the queue (dequeue).

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

What’s a linked list

A

a list containing several items in which each item in the list points to the next item in the list. In a linked list a new item is always added to the start of the list

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

What are the 6 data types

A

Boolean
Char
Date
Integer
Real
String

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

What type of data type are records

A

They’re composite data types

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

what’s are the identifiers that are put in a linear search model there’s 6 of them

A
  1. item —> thing that needs to be found
  2. mylist —> array to be searched
  3. upperBound
  4. lowerBound
  5. index —> pointer to current array element
    6.found —> flag to show when it’s found
17
Q

what are the 7 identifiers you need to know for bubble sort

A
  1. my list —> array that needs to be searched
  2. UB
  3. LB
  4. index
  5. swap
  6. top —> index of last element to compare
  7. temp —> temporary storage location during swap
18
Q

what are the 3 modes in files

A

read
write —> writes data to a file in any existing data stored in file so it will be overwritten

append —> adds data to the end of file

19
Q

what’s EOF

A

it is used to test for the end of the file

it will return the value true if the end of a file has been reached

and a false otherwise

20
Q

what are the two pointers that a stack uses

A
  • a base pointer

it points to the first item in the stack

  • a top pointer

points to the last item in the stack

if they equal then there’s one item in stack

21
Q

what are the two pointers a queue has

A
  • a front pointer

points to the first item in the queue

  • a rear pointer

points to the last item in the queue

22
Q

what’s a node

A

it’s in a linked list when an item in a linked list is stored together with a pointer to the next item

and the last item in a list had a null pointer

23
Q

why should a queue be managed as a circular queue

A

if items are removed from the front and added to the end of a queue, the position of the queue in the array changes so we should manage it with circular queue to avoid moving the position of the items in the array everytime an item is removed