cs 1.1 Flashcards

(32 cards)

1
Q

Integer

A

A whole number, positive or negative, including zero.

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

real /float

A

A positive or negative number which can have a fractional part.

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

Boolean

A

value that can be true/false

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

Character

A

a single number, letter or symbol

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

String

A

A collection of characters

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

Pointer/reference

A

a way of storing memory addresses

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

Records

A

a collection of fields, each of which could have a different data type.

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

Arrays

A

a finite, indexed set of related elements each of which has the same data type

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

User-defined data types

A

derived from existing data types in order to create a customised data structure

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

Variable declaration

A

creating a variable for the first time, giving name and sometimes data type. allocated a portion of computer’s memory to the variable

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

assignment

A

giving a constant or variable a value

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

iteration

A

repeating a block of code, could be definite(no. of repetitions known) or indefinite (no. of repetitions not known)

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

selection

A

comparing values + choosing an action based on those values

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

subroutine

A

named block of code, containing set of instructions designed to perform a frequently used operation

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

nested structures

A

one structure is placed within another (identified by different levels of indentation)

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

modulo

A

returns remainder of an integer division
12 MOD 8 = 4

17
Q

Truncation

A

removing the decimal part of a no.
never rounds up
e.g. 3.14 truncated = 3

18
Q

NOT

19
Q

AND

A

1 1 = 1
0 1 = 0

20
Q

OR

A

1 1 = 1
1 0 = 1

21
Q

XOR

A

1 1 = 0
1 0 = 1

22
Q

Variable

A

change their value during execution of a program

23
Q

Constant

A

value cannot change once assgined

24
Q

substring

A

giving a staring position and a length, return a portion of a string

25
concatenation
joining two or more string together to form a new, longer string
26
exception handling
when error occurs in program code, an 'exception' said to be thrown. the computer then handles exception to avoid crashing, does this by pausing execution of program and saving state of program before running the catch block
27
Functions
type of subroutine has to return a value
28
procedure
type of subroutine not required to return a value
29
Local variable
variable that can only be accessed from subroutine in which it was declared, created when subroutine starts and destroyed when subroutine ends
30
advantage of local variable
only exist in computer's memory when the parent subroutine is executing, so more memory efficient than global ones
31
global variables
can be accessed from any part of the program and exist in memory for entire duration of programs execution
32