Practice Control Structures (4.4.3) - Introduction to C/C++ Programming for Microcontrollers
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Control Structures

Practice - Control Structures

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

What does an if statement do?

💡 Hint: Think about how a light switch works—on or off.

Question 2 Easy

What is the purpose of a loop in programming?

💡 Hint: Consider how a repeating alarm works.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What does an if-else statement allow you to do?

Loop through code
Make decisions based on conditions
Print messages

💡 Hint: Think about its function in controlling LED based on conditions.

Question 2

True or False: The continue statement halts the execution of a loop.

True
False

💡 Hint: Consider how it affects only some items in the loop.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Write a C/C++ program that uses both an if statement and a while loop to check for a button press and toggle an LED state.

💡 Hint: Remember to check the state of the button continuously!

Challenge 2 Hard

Design a switch-case scenario that changes the LED's blinking speed based on a variable that represents the speed setting.

💡 Hint: Use cases to represent different delay times for the LED toggle.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.