Program Console Vignaankosh.com
Execution Panel
Console is empty.
Find student with lowest marks 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>
struct Student {
int roll;
char name[40];
float percentage;
};
int findLowest(struct Student s[], int n) {
int minIndex = 0;
for(int i = 1; i < n; i++) {
if(s[i].percentage < s[minIndex].percentage) {
minIndex = i;
}
}
return minIndex;
}
int main() {
struct Student students[50];
int n;
printf("Enter number of students: ");
scanf("%d", &n);
for(int i = 0; i < n; i++) {
printf("\nStudent %d:\n", i+1);
printf("Roll: "); scanf("%d", &students[i].roll);
printf("Name: "); scanf(" %[^\n]", students[i].name);
printf("Percentage: "); scanf("%f", &students[i].percentage);
}
int lowestIndex = findLowest(students, n);
printf("\n========== LOWEST SCORER ==========\n");
printf("Roll No: %d\n", students[lowestIndex].roll);
printf("Name: %s\n", students[lowestIndex].name);
printf("Percentage: %.2f%%\n", students[lowestIndex].percentage);
return 0;
}