Student Record

Easy Structures
Solve in Playground →

Problem Statement

Write a C++ program defining a `Student` structure with roll number, name, and marks, reading instance data, and printing it.

Input Format

Roll number (int), Name (string), and Marks (float).

Output Format

Print student details formatted as labels.

Constraints

Roll >= 0, Marks 0.0 to 100.0

Sample Input

101 John 92.5

Sample Output

Roll: 101, Name: John, Marks: 92.50

Explanation

Structures group related variables of different types under a single user-defined custom type.

Starter Code

#include <iostream>
#include <string>
#include <iomanip>

struct Student {
    int roll;
    std::string name;
    float marks;
};

int main() {
    Student s;
    if (std::cin >> s.roll >> s.name >> s.marks) {
        // Write your code here
    }
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

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