Test 3 Flashcards
What does it mean to decrement a variable?
Subtract 1 from it
What does it mean to increment a variable?
Add 1 to it
What is a unary operator?
An operator with a single operand
What does x++; mean?
Add 1 to x
What does x–; mean?
Subtract 1 from x
What is a binary operator?
An operator with 2 operands
What does x+=5; mean?
Add 5 to x
What’s does x-=5
Subtract 5 from x
What does x*=5; mean?
Multiply x by 5
What does x /=5 mean?
Divide x by 5
What’s shorthand for x=x+23
x+=23 (etc for other operations)
What data type is used to process individual characters?
char
What data type is used to process one or more characters
String
What kind of quotes used w/ String
Double “”
What kind of quotes used with characters
Single ‘’
What is accomplished by the statement c1=c2=c3=’Q’; what type of assignment is this called?
Every variable is assigned to the value of Q, chain assignment or chaining
Why is + an overloaded operator
It concatenates (with String variables) and adds (with int or double)
Who invented form of algebra based on logic statements that are either TRUE or FALSE
George Boole
What data type can only store either TRU or false
Boolean
What is datas formal language for the term simple data types
Primitive data types