Chapter 2 Flashcards
A “data type” is a classification that describes 3 things about an item. What are those things?
- What values can be assigned to it
- How the item is stored.
- What operations can be performed on that item.
This word describes data that consists of numbers and can have arithmetic operations performed on it.
Numeric
What is a non-numeric data type called?
a “string”
What is the difference between integers and floating-point numbers?
Integers are whole numbers, while floating-point numbers make use of decimal points/places.
What is another word for floating-point numbers?
Real numbers
A numeric constant is a specific numeric value. Therefore, it is…
Literal.
A specific group of characters enclosed within quotation marks.
Literal string constant
A literal numeric or string constant is called
an unnamed constant
A feature of some programming languages that prevent assigning values of an incorrect data type
Type-safety
What would you call programming languages that prevent the assignment of an incorrect value to a data type?
Strongly-typed
The name of a program component
Identifier
the limited word set that is reserved in a programming language
keywords
What are, objectively, the ugliest naming conventions?
Hungarian notation and Kebob notation
What symbol is the assignment operator?
Equal sign.
A value used by an operator
Operand.
An operator that requires 2 operands - one on each side of it.
Binary operator.
This makes it so that a value on the right of a binary operator is saved to a memory address defined on the left of that same binary operator
Assignment statement.
In an assignment statement, what can go on the right?
A variable or constant
A more specific word for the operand on the left side of an operator that holds the memory address identifier
L-value
An unknown value stored in an unassigned variable
Garbage
Assigning a variable’s first value at the same time that said variable is declared is called:
Initializing the variable.
What makes a named constant, or “magic number” different from other variables?
Its value cannot change after its first assignment.
Dictate the order in which operations within the same statement are carried out
Rules of Precedence
Arithmetic operations use ________, while variable assignments use _________
left-to-right associativity, right-to-left associativity