ACTUAL Exam Questions and CORRECT
Answers
Variable - CORRECT ANSWER - A named item used to hold a value.
Ex: x, numItems, numPeople
Assignment Statement - CORRECT ANSWER - Assigns a variable with a value.
Example: The example states that x is assigned to 5.
x=5
Variable Declaration - CORRECT ANSWER - A statement that declares a new variable,
specifying the variable's name and type.
Integer - CORRECT ANSWER - A whole number. Commonly used to count items.
Example: 1, 999, 0, -25.
Identifier - CORRECT ANSWER - A starts with a letter, can contain a sequence of letters,
digits, and underscores.
Example: num_Cars1, numCars, num__Cars
Reserved Word (Key Word) - CORRECT ANSWER - A word that has a special meaning
in a programming language and therefore cannot be used as a name by the programmer.
, Examples: Get, Put
Naming Conventions - CORRECT ANSWER - A set of style guidelines defined by a
company, team, teacher, etc., for naming variables.
Are case-sensitive.
Uses Camel Case: capitalizing each word except the first.
Underscore Separated: words are lowercase and separated by underscores.
Expression - CORRECT ANSWER - A combination of items like variables, literals,
operators, and parentheses that evaluates to a value.
Example: x is 3
2 * (x + 1) = 8
Literal - CORRECT ANSWER - A specific value in code, like 2.
Operator - CORRECT ANSWER - A symbol that performs a built-in calculation.
Example:
*/+-
Precedence Rules for Arithmetic Operators - CORRECT ANSWER - Rules used to
evaluate an expression in a certain order.
1. ( ) - Items in parentheses.