Program Console Vignaankosh.com
Execution Panel
Console is empty.
Store details of multiple students is an interactive C dry run visualizer from the Structures Arrays programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
#include <stdio.h>
#include <string.h>
#define MAX_STUDENTS 100
struct Student {
int rollNo;
char name[50];
float marks;
};
int main() {
struct Student students[MAX_STUDENTS];
int n, i;
printf("Enter number of students: ");
scanf("%d", &n);
// Input details for each student
for(i = 0; i < n; i++) {
printf("\n--- Student %d ---\n", i+1);
printf("Enter Roll No: ");
scanf("%d", &students[i].rollNo);
printf("Enter Name: ");
scanf(" %[^\n]", students[i].name);
printf("Enter Marks: ");
scanf("%f", &students[i].marks);
}
// Display all students
printf("\n========== STUDENT RECORDS ==========\n");
printf("%-10s %-30s %-10s\n", "Roll No", "Name", "Marks");
printf("%-10s %-30s %-10s\n", "-------", "----", "-----");
for(i = 0; i < n; i++) {
printf("%-10d %-30s %-10.2f\n",
students[i].rollNo, students[i].name, students[i].marks);
}
return 0;
}