NEW
Font size
WorksheetsROB 1 (2nd GRADING)
Total questions: 15
Worksheet time: 5mins
What is a variable in C programming?
A keyword used to define data types
A memory location used to store data
A function used to perform calculations
A statement used to repeat code
Which of the following is the correct way to declare an integer variable named score with the value 10?
int = 10 score;
int score = 10;
score int = 10;
10 = int score;
Which data type should be used to store decimal values in C?
int
char
float
bool
Which of the following is the correct syntax for an if statement in C?
if condition then
if: condition
if (condition) { }
if = condition
In Arduino, what is the primary purpose of a switch?
To provide power
To connect or disconnect circuits
To store digital data
To convert signals
What is the result of 10 % 3 in C?
0
1
2
3
What will be the output of true && false?
false
true
What is the function of a potentiometer in a circuit?
To store voltage
To control current via variable resistance
To act as a power supply
To produce sound
Which Arduino function reads the analog value from a potentiometer?
analogRead()
analogWrite()
digitalRead()
digitalWrite()
What range of values does analogRead() return in Arduino?
0–5
0–255
0–1023
0–10
How many LEDs make up a standard 7-segment display?
5
6
7
8
What is the main function of a 7-segment display?
Control current flow
Measure resistance
Display numerical digits
Generate sound
How many pins does a typical common cathode 7-segment display have?
5
7
10
12
In Arduino, how is a potentiometer usually connected?
One side to 5V, one to GND, and middle (wiper) to analog input
One side to analog input, middle to GND, other to 5V
All pins to digital ports
Wiper to 5V only
What is the role of a potentiometer connected to an Arduino analog pin?
It stores analog signals
It acts as a voltage divider providing variable input values
It converts digital to analog
It limits current to an LED
