What does the ‘if’ statement do?
It evaluates a specific condition and if it’s met, executes the branch of code.
What is the syntax for a basic if statement?
if ( condition )
{
body;
}
What is the operator used to compare if two values are equal?
The ‘==’ operator
What does the ‘!’ operator do?
It inverts a value
What is the value of ‘x’ after the code is executed?
int x = 9;
if (x != 10)
{
x = 10;
} x += 3;
x = 13