Lecture 5 - Arrays and Structs Flashcards

1
Q

organized collection of values that may be used for data together with a set of operations that may be performed with the data.

A

Data Structures

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

data whose values are directly supported in the hardware of the computer (int, float, double, char)

A

Elementary or Scalar

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

contains group of scalars, each accessed by a referencing mechanism. (array, records, structures)

A

Structure

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

data types that are defined by the developers (enumeration, type declaration)

A

Abstract

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

a finite, ordered collection of homogeneous elements, each accessed through a subscript value.

A

Arrays

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

all the elements are arranged in order (first, second, third, and so on)

A

ordered

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

there is a specific number of elements in the array

A

finite

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

all the elements in the array must be of the same type (e.g. all integers, all characters or all floating point)

A

homogeneous

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

type of the values used to access the individual elements of the array

A

Index (subscript type)

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

type of elements or components
of the array.

A

Base Type (common type)

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

specifies the position of the component of the array

A

indexExp

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

How to Declare Arrays?

A

dataType, array_name, array_size

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

How to Initialize Arrays

A

dataType array_name

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

usually enclosed in brackets, determines the number of elements that an array has to contain

A

array_size

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

How to access arrays

A

array_name[indexExp]

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

a function that accepts an array variable, indicated by its array name and element of its index type and returns the arrays content

A

Extraction

11
Q

an operation that accepts a value and stores it in an array variable

A

Storing

12
Q

the process of arranging items of information into a desired form

A

Sorting

13
Q

performs sorting by repeatedly comparing the neighboring element as the sorting process goes and any time it finds a larger element before a smaller element, it swaps the elements until the whole array is sorted.

A

Bubble Sort

13
Q

Methods in Searching Algorithm:

A

☞ Sequential Search
☞ Binary Search

13
Q

performs sorting by repeatedly putting the largest element in the unsorted portion of the array to the end of this unsorted portion until the whole array is sorted.

A

Selection Sort

14
Q

process of finding a particular element (key) in an array

A

Searching

14
Q

the list or array is traversed sequentially and every element is checked

A

Sequential Search

15
Q

repeatedly target the center of the search structure and divide the search space in half

A

Binary Search

16
Q

collection of variables that are referenced under one name, providing convenient means of keeping related information together

A

Structures

17
Q

components of Structure Variables

A

Individual structure elements are referenced by using the . (“ dot”)