wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ROB 1 (2nd GRADING)

Total questions: 15

Worksheet time: 5mins

Name
Class
Date
1.

What is a variable in C programming?

a)

A keyword used to define data types

b)

A memory location used to store data

c)

A function used to perform calculations

d)

A statement used to repeat code

2.

Which of the following is the correct way to declare an integer variable named score with the value 10?

a)

int = 10 score;

b)

int score = 10;

c)

score int = 10;

d)

10 = int score;

3.

Which data type should be used to store decimal values in C?

a)

int

b)

char

c)

float

d)

bool

4.

Which of the following is the correct syntax for an if statement in C?

a)

if condition then

b)

if: condition

c)

if (condition) { }

d)

if = condition

5.

In Arduino, what is the primary purpose of a switch?

a)

To provide power

b)

To connect or disconnect circuits

c)

To store digital data

d)

To convert signals

6.

What is the result of 10 % 3 in C?

a)

0

b)

1

c)

2

d)

3

7.

What will be the output of true && false?

a)

false

b)

true

8.

What is the function of a potentiometer in a circuit?

a)

To store voltage

b)

To control current via variable resistance

c)

To act as a power supply

d)

To produce sound

9.

Which Arduino function reads the analog value from a potentiometer?

a)

analogRead()

b)

analogWrite()

c)

digitalRead()

d)

digitalWrite()

10.

What range of values does analogRead() return in Arduino?

a)

0–5

b)

0–255

c)

0–1023

d)

0–10

11.

How many LEDs make up a standard 7-segment display?

a)

5

b)

6

c)

7

d)

8

12.

What is the main function of a 7-segment display?

a)

Control current flow

b)

Measure resistance

c)

Display numerical digits

d)

Generate sound

13.

How many pins does a typical common cathode 7-segment display have?

a)

5

b)

7

c)

10

d)

12

14.

In Arduino, how is a potentiometer usually connected?

a)

One side to 5V, one to GND, and middle (wiper) to analog input

b)

One side to analog input, middle to GND, other to 5V

c)

All pins to digital ports

d)

Wiper to 5V only

15.

What is the role of a potentiometer connected to an Arduino analog pin?

a)

It stores analog signals

b)

It acts as a voltage divider providing variable input values

c)

It converts digital to analog

d)

It limits current to an LED