Write a C program using an enum representing operations (ADD=1, SUB=2, MUL=3, DIV=4) to compute expressions.
Operation code (1-4) followed by two integers A and B.
Print the calculation result.
1 <= Op <= 4, -1000 <= A, B <= 1000
1 10 20
30
Operation 1 (ADD) on 10 and 20 gives 30.
#include <stdio.h>
enum Operation { ADD = 1, SUB, MUL, DIV };
int main() {
int op, a, b;
if (scanf("%d %d %d", &op, &a, &b) == 3) {
// 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