Chapter 2 Flashcards
an _____ describes how a problem is solved by listing the actions that must be taken and the order of execution
algorithm
after choosing names for your variables you must…?
specify their data type
when you choose the name of your variable and then declare its data type you are ____ your ______.
declaring
variables
simple data types for representing integers or floating-point number are called _____ ____ ___ or ____ ___
primitive data types
fundamental types
doubles means ___ ___
double precision
what is the cin object used for?
for reading input from the keyboard
a _____ directs the user to input something
prompt
what does cin stand for?
console input
what is the»_space; called?
the stream extraction operator
A
from B to A
A»B if this is the case which direction is the data floating?
from A to B
how can you declare more than one variable at the same time?
by declaring them all in a comma separated list (eg. int i, j, k)
is int count = 1 equivalent to int count: count = 1; ?
yes
a variable _____ (must be/doesnt have to be) declared before it can be assigned a value.
must be
when a variable is not assigned a value, what is the value called?
uninitialized
what is assigning a value to a variable called?
initialization
what is the scope of the variable?
it is the part of the program where the variable can be referenced
what is an eqaul sign (=)?
an assignment operator
after a variable is declared, you can assign it to a value by using a _____ ______
assignment statement
to assign a variable you must a value to a variable, you must place the variable name to the _____ of the assignment operator
left
a ___ ____ is an identifier that represent s a permanent value
named constant
what is the syntax for declaring a constant
const datatype CONSTANTNAME = value;
a constant ______ (must be/doesn’t have to be) declared and intialized in the same statement
must be
by convention constants are named using ____
uppercase
what is the storage size of short (short int)?
16 bit
what is the storage size of unsigned short (unsigned short int)?
16 bit
what is the storage size of int signed?
32 bit
what is the storage size of unsigned (unsigned int)?
32 bit
what is the storage size of long (long int)?
32 bit
what is the storage size of unsigned long (unsigned long int)?
32 bit