IDE correct answers Integrated Development Environment
cout correct answers Stands for console output; the standard output stream object in C++; used
with the insertion operator to display information on the computer screen
#include <iostream> correct answers The include directive needed to allow use of the various I/O
operators such as cout and cin.
using namespace std; correct answers Declares that the program will be accessing entities whose
names are part of the namespace called std
int main() correct answers The header for the main function of the program, int tells compiler
function will be returning an integer (return 0;)
Statement Terminator correct answers The semicolon (;) is used to indicate the end of a
statement.
Comments correct answers Using descriptive text to explain portions of code. Comments do not
change the way a robot behaves, but are important for the programmer to remember what the
code does.
endl; correct answers A stream manipulator used with cout that can be used to advance the cursor
to the next line on the computer screen
Syntax Rules correct answers Programming syntax rules must be followed for the compiler to
understand you
Good Programming Style correct answers Leaving open lines, putting statements on seperate
lines, using comments in code, indenting code etc.
, BODMAS correct answers Brackets, Order, Division, Multiplication, Addition, Subtraction
Data Type: Integer correct answers Integer numerical ; No decimals/fractions (Even with
division); Positive and Negative Numbers;
Variable correct answers We declare a var with a name so we can refer to the value stored in the
memory position in a program; Use meaningful names; Always declare or initialise before use.
Variable and Function Name Rules correct answers Cannot start with a numeric character, but
numbers and all letters can be used after that; Can start with or have an underscore _ ; Cannot
used reserved names, eg. int, return. Case Sensitive. Can use CamelNotation.
Modulo (or "mod") correct answers the name of the mathematical operation. Modulo gives the
remainder from dividing two numbers. For example: 17 MOD 13 is 4.
X MOD 1 is always 0.
Assignment Operator correct answers The '=' character causes the compiler or interpreter to
evaluate to the expression on its right and store the result in the variable(s) on its left. Variable =
Expression;
Compound Assignment Operator correct answers an operator that combines assignment (setting
value of the variable) with another operation, such as addition or subtraction.
Unary Increment and Decrement Operators correct answers These operators (++, --) together
with the variable they are operating on, return a value, which depends on if operator is used in
prefix or postfix form.
Prefix Form (++i or--i) correct answers First increments/decrements the variable, then uses the
incremented value in the expression.