Posts

Showing posts from September, 2022

Structure of 10 students with name,roll number, marks of five subject and who is topper in which subject as well as overall who is topper

 // Date : 24/09/2022 //Author : Niraj Rajendra Bhagvat  #include <stdio.h> struct student {     int roll;     int eng,chem,phy,bio,math;     int total;     char name[20]; }; int main() {     struct student std[3];     int n = sizeof (std)/ sizeof (std[0]);     int topper[5],Topper,T;     int tot_sub[5];     float avg_sub[5];     float perc[n];     int e,c,p,m,b;     for ( int i = 0; i<n; i++)     {         std[i].roll = i+1;         printf( "\nEnter the name of roll number %d : " ,std[i].roll);         scanf( "%s" ,std[i].name); eng:         printf( "\nEnter the marks of English out of hundred : " ); ...