Computer science paper 1 Flashcards

1
Q

integer

A

+/- whole number

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

real/float

A

+/- quantity (can be a decimal)

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

Boolean

A

true/false

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

array

A

-data structure that holds similar related data, allocating a contiguous part of memory for the purpose of storing that data
-starts at index 0

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

pointer

A

-variables declared as a pointer are used to store memory address of objects created at runtime
-use far less memory copying pointer that copying section of memory it is pointing to (32/64 bits in lenghth)

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

computer program

A

-series of statements that are executed one after the other

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

sequences

A

-executing one instruction after another

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

selection

A

allows program to branch and follow different direction dependinng on outcome of condition
e.g. if

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

iteration

A

-repeating sections of code
e.g. FOR loops
WHILE loops

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

variable

A

-a value that can change while program is running
-an address in memory

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

constant

A

-value that remains fixed
-must be set when program is first written

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

assignment

A

-supply a value to a variable/ constant

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

advantages of constants over variables

A

-C makes program easier to read by replacing strings with meaningful indentifiers that are easy to understand
-C makes program easier to modify and understand
-C may be referred to many times but will only neeed to be modified in 1 location

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

ALU

A

-arthmetic operation
-logical comparisons
-binary shifts

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

arthmetic operation

A

addition = +
subtraction = -
multiplication = *
division = /
exponentiation = **
modulus = % (7 MOD 2 = 1) remainder
integer division = // (7 DIV 2 = 3) division without any remainders
rounds = round() (x = round (2.667, 1) = 2.7)
truncates = trunc() (x = trunc(2.667,1) = 2.6)

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

common comparison operators

A

== equal to
!= not equal to
<= less than or equal to
>= greater than or equal to

17
Q

boolean operators

A

NOT

AND

OR

XOR

18
Q

String manipulation

A

The act of manipulating ,extracting or changing characters in a string variable