What is the main purpose of a variable in programming?
To act as a "storage box" for saving data.
What keyword starts a simple conditional statement to test if a condition is true?
if
What is the primary purpose of a loop in coding?
To repeat a block of code/instructions.
What are functions in programming?
Reusable blocks of instructions/code.
Is C++ / Arduino code case-sensitive?
Yes (e.g., pinMode vs pinmode).
Which data type holds a single character wrapped in single quotes, such as 'A'?
char
What Boolean operator stands for "Logical NOT" and reverses a true/false value?
! (Exclamation mark)
What type of loop runs as long as a specified conditional expression remains true (e.g., while (timer < 10))?
A while loop
Which built-in Arduino function runs only once when the board first powers on?
void setup()
What type of error happens during code translation due to bad syntax or incorrect casing?
Compilation Error
What character must be placed at the end of a variable declaration statement in C++?
A semicolon ;
What kind of statements can be used as an alternative to multiple if/else checks when matching a variable against specific discrete cases?
A switch statement
Which keyword is used to instantly stop and exit a loop?
break
Which Arduino function sends a HIGH (5V) or LOW (0V) signal to a digital pin?
digitalWrite()
What type of error occurs when the Arduino IDE fails to communicate with or flash code to the board?
Uploading Error
Which data type is used to store decimal numbers, like 19.99?
float (or double)
What statement exits a function completely and optionally passes a value back?
return
Besides a while loop, what other common loop structure allows you to repeat code for a set number of iterations?
A for loop
Which function reads the current state (HIGH or LOW) of a digital pin?
digitalRead()
What type of error allows code to compile and upload cleanly, but causes the program to behave incorrectly while running on hardware?
Execution (or Runtime/Logic) Error
What type of variable scope is accessible anywhere throughout the entire program?
Global scope
Which control flow modification statement skips the rest of the current loop iteration and moves to the next one?
continue
If a loop's conditional check is always true and never becomes false, what kind of loop is created?
An infinite loop
What do you call the values placed inside the parentheses when calling a function, such as 13 and HIGH in digitalWrite(13, HIGH)?
Parameters (or Arguments)
Selecting the wrong COM or Serial Port in the IDE causes which of the three error types?
Uploading Error