Write a C++ program defining a `Result` class that determines pass/fail status based on marks obtained in 5 subjects.
Roll number, Name, and 5 integer marks.
Print total marks and status ('Pass' if average >= 40, else 'Fail').Marks between 0 and 100
101 Alex 45 50 55 60 65
Roll: 101, Name: Alex, Total: 275, Status: Pass
Evaluates complex pass/fail condition logic through object encapsulation.
#include <iostream>
#include <string>
class Result {
public:
int roll;
std::string name;
int marks[5];
void evaluate() {
// Write your code here
}
};
int main() {
Result r;
if (std::cin >> r.roll >> r.name) {
for (int i = 0; i < 5; ++i) std::cin >> r.marks[i];
r.evaluate();
}
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