Write a C program using an enum for traffic signals (RED=0, YELLOW=1, GREEN=2) and read an integer input to print the matching state message.
An integer (0, 1, or 2).
Print 'Stop' for 0, 'Ready' for 1, 'Go' for 2, or 'Invalid' otherwise.
0 <= Input <= 2
2
Go
Signal 2 corresponds to GREEN state ('Go').
#include <stdio.h>
enum Signal { RED, YELLOW, GREEN };
int main() {
int val;
if (scanf("%d", &val) == 1) {
// Write your code here
}
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used