Write a C program using a structure to store an employee ID, name, and salary, then print their details.
An integer ID, a string name, and a double salary.
Print employee details in the format 'ID: X, Name: Y, Salary: Z' (salary to 2 decimal places).
1 <= ID <= 100000, Name length <= 50, 0.0 <= Salary <= 1000000.0
1001 Smith 55000.50
ID: 1001, Name: Smith, Salary: 55000.50
Defines an Employee structure, reads fields, and prints formatted output.
#include <stdio.h>
struct Employee {
int id;
char name[51];
double salary;
};
int main() {
struct Employee e;
if (scanf("%d %50s %lf", &e.id, e.name, &e.salary) == 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