Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a program to store student records using a struct and display the details.

Hard

Problem Statement

Create a program to store student records using a struct and display the details.

Sample Input

Student = {name = 'Alice', age = 21, grade = 'A'}

Sample Output

Name: Alice, Age: 21, Grade: A

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> struct Student { char name[50]; int age; char grade; }; int main() { struct Student student; // Add student details // Logic to display student details return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
Student = {name = 'Alice', age = 21, grade = 'A'}
Expected Output
Name: Alice, Age: 21, Grade: A