What can cin be used to do?
a) can be used to read data typed at the keyboard b) to exit the program c) define variables
cin can be used to read data typed at the keyboard
100
What are arguments?
An Argument is a piece information being sent to the function;
100
What is 1 + 1?
(not a trick question)
2
100
________ is a debugging process where you pretend that you are the computer executing a program
Hand Tracing
100
int, double, char, string, etc. are examples of what?
types
200
What does cin stand for?
a) Cinnamon
b) console input
c) control input
console input
200
On some C++ compilers ____ arguments will also work
a) integer
b) expressions
c) cin
d) sixtynine
integer
200
What should always precede cin?
should always be preceded by the prompt (cout)
200
What does cout provide?
ways to format data as it is being displayed and this affects the way data appears on the screen
200
What are the things between the parentheses called?
int sum(int n1, int n2)
arguments or parameters to a method
300
In the popular Nickelodeon TV show
"SpongeBobSquarePants" where does SpongeBob work?
The Krusty Krab
300
What type do you use to read a text file? (hint: c??)
cin
300
What is significant of the direction of stream operators?
a) Appear to point in the direction that data is flowing!
b) Asks the user for an input
c) To build mathematical expression(s)
Appear to point in the direction that data is flowing!
300
What does the pow function do?
raises the first argument to the power of the second argument
300
ifstream, ofstream, string, are what?
Classes
400
What is ">>" ? What does this mean?
This is the stream extraction operator which extracts characters from the input stream so they can be used in the program; gets characters from the stream object on its left and stores them in the variable whose name appears on its right
400
Can you use exponents in C++?
NOOOOOOOOO!!!!!!!!!!!!!
400
What are mathematical operators used to do?
They are used to build mathematical expressions
400
What is formatting?
The way a value is printed
400
What are lines of code that begin with // called?
e.g.,
// what are these called?
comments
500
Where is the placement of characters from the keyboard that a user enters? What does cin do when it reads these characters?
input buffer, or keyboard buffer; cin automatically converts them to the data type of the variable where the input data will be stored
500
What will be the value in outcome = 12 + 6 / 3
a) 12
b) 14
c) 6
d) Undefined
14 because the division operator has higher precedence than the addition operator
500
What is an expression?
Something that can be evaluated to produce a single value
500
What can be used to format numbers (column-wise)?
setw() making sure to also use
500
A ____ ____ expression lets you manually promote or demote a value. Below is an example.
static_cast(Value)