I think this program is best to store details of students
C:
/*
Program to store record of student using structure
Author : Anukalp
Language : C Programming
Date : 24.8.2018
*/
/* Header files */
#include<stdio.h>
#include<string.h>
struct Student
{
int roll_number; /* Decleare variable to store integer value */
char name[50]; /* Decleare variable to store 50 character */
char branch[50]; /* Decleare variable to store 50 character */
float parcentage; /* Decleare variable to store float value */
} record[100];
/* Program start from here */
int main (void)
{
int i;
printf ("students information \n");
// storing information
for ( i = 0; i < 100; ++i)
{
record[i].roll_number = i+1;
printf ("\nEnter information For Roll Number %d,\n",record[i].roll_number);
printf ("Enter Name: ");
scanf ("%s",record[i].name);
printf ("Enter Branch: ");
scanf ("%s",record[i].branch);
printf ("Enter parcentage : ");
scanf ("%f",&record[i].parcentage);
printf ("\n");
}
return 0; //Program complete successful
}