• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/53

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

53 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)

Which type of data is the answer to this question: “How many students are in this room”

Variable

Which type of data is the answer to this question: “How many grams in a kilogram”

A constant

What type of data does this use “-10634”

A whole number

What type of data is this: “27.123”

A decimal number

What type of data is this: “A”

A character

What type of data is this “Harry Williams”

Text (a string)

What type of value does a whole number have

An integer value

What type of value does a decimal number use?

A floating point number

What type of value does a character have ?

A char

What does a computer use to store data?

A bit

What values can a bit have and what do they mean?

0 and 1. They say whether something is on or off.

What is the next largest measurement of a bit and how many bits does it use?

A byte which uses 8 bits

What does this binary number equal: 11011001

1+8+16+64+128 = 217

On an Arduino how many bits is used for a char?

8 bits

On an Arduino how many bits is used for a short

16

On an Arduino how many bits is used for a int

16

On an Arduino how many bits is used for a long

32 bits

What main 2 reasons are there for integer types and why?

Memory efficient- data types take up the whole memory even if they aren’t filled so by having lots of different lengths it saves wastage and therefore memory.


Program efficiency- It makes the program faster

In programming what does this mean : “=“

Assignment. You use it to give a variable a value for example y = 5

In programming what does this mean : “%”

Modulo- it tells you what is left over

For an int would “y / 3” or y % 3” give you 2

y / 3

For an int would “y / 3” or y % 3” give you the remainder of the sum

“y % 3”

What data type has been used in this line would the answer be right or wrong. Why would the answer be this?


“(Type) y = 4000 * 300;”

It uses an int and the answer would be 20352. This is the wrong answer as there was not enough memory to store the full number and it has instead used the final part of the answer. It has then calculated this answer back to English and therefore the number is wrong

What data type has been used in this line would the answer be right or wrong. Why would the answer be this?


“(type) y = (type) 4000 * (type) 300;”

It uses a long and the answer would be 1200000 which is correct because there was enough memory

What does “Serial.begin(9600) do?

Starts the serial port so it can output.

What does this do: Serial.print()

Prints to the serial port

What does this do: Serial.println()

Prints to the serial port on a new line

What does this do: Serial.readint

Reads an integer from the serial line

How do you declare a float and what does it do

float variableName. It lets you use a decimal number like 17.86

What is the bit value of a float

32

How many significant figures can floats give you

7

In bit arrangement how many bits are for each of these :


The sign.


The exponent


The fraction

1


8


23

Are the pros of floats

Can store very large numbers


Can store very small numbers


Calculations give accurate answers

What must the types of arrays do

Be the same type in a particular array. For example an array of ints or chars

What is a for loop

A loop that runs until a condition is met.

What is a while loop?

A while loop is a loop that runs until a statement is no longer true

What is a do while loop

A do while loop is a loop that happens whilst another operation is being carried out

What are the cons of floats

The use up a lot of memory


Calculations take longer than integer calculations


Difficult to test if 2 values are equal

What does the statement


“X = x + 3” look like as a compound operator

X += 3

Using just 3 characters how can you add one to a variable

X++

The shortest version of x = x-1

What does && mean

And

What does || mean

Or

What does > mean

Greater than

What is a for loop

A loop that runs for a specific amount of times

What does == mean

Comparison

What does != mean

Not

What is a while loop?

A while loop is a loop that runs until a statement is no longer true. Aka whilst a condition is met.

Pre or post increment “x == y;” and what happens in this statement.

Pre increment 1 is added to y and ys value is passed to x

Pre or post increment “x=y++;” and what happens in this statement.

Post increment. The value of y is given to x then 1 is added to y.

Pre or post increment “x = ++y;” and what happens in this statement.

Pre increment 1 is added to y and ys value is passed to x

What is a pointer?

It stores the memory address of a variable. Means you can switch data sets without copying data.

How do you set a pointer?ho

int *(pointer name) = & (variable name);


int *piValue = & iCount;

How do you use a pointer as a dereference?

int*piValue = & iCount;


Int idata = *piValue;// piValue;