The two ways to add comments
// and /* ... */
3 (remainder is discarded in integer division)
Why is the variable name 6pack illegal in C++?
Variable names cannot start with a number.
What kind of error occurs if you forget a semicolon at the end of a statement?
A compiler error (or syntax error)
The name of the >> operator used with cin
The extraction operator
int x = 1;
x++;
x++;
x--;
What is the value of x?
2
Why is the variable name "can volume" illegal in C++?
Variable names cannot contain spaces
If you define int Main() instead of int main(), what specific error occurs?
A link-time error (the linker cannot find main)
The command used to print text
cout
What is the result of 7.0 / 2
3.5
Why is the variable name "double" illegal in C++?
If your program attempts to execute the statement: cout << 10 / 0;, what error occurs?
A run-time error, specifically a "Divide by zero" exception
What is the name of the "=" operator?
The assignment operator
What is the result of the expression 7 % 2
1
Why is the variable name ltr/fl.oz not allowed?
Variable names cannot use symbols such as "/" or "."
When the compiler lists a lot of errors, which one should you attempt to fix first?
The first one encountered, as it likely caused the subsequent ones.
What does the reserved word const do to a variable?
Makes it so the variable's contents cannot be changed and must be set when created
What is wrong with the expression: (-(b * b - 4 * a * c) / (2 * a) ?
The parentheses are unbalanced.
Why should you exercise caution when using a variable name like "Can_volume" ?
It is generally best practice to name variables in all lower case because variable names are case-sensitive.
What is the term for a severe run-time error signal from the processor that aborts a program?
An exception