Source Code of Video File Handling in C - INSERT, UPDATE, DELETE, SORT, SEARCH of STUDENT RECORD - IN FILE WITH STRUCTURE
Video : File Handling in C (CRUD Operation) /*Source Code of Video File Handling in C - INSERT, UPDATE, DELETE, SORT, SEARCH of STUDENT RECORD - IN FILE WITH STRUCTURE */ #include <stdio.h> typedef struct student{ int rno; //Member of structure char name[ 20 ]; //Pointer within structure struct subject{ //Structure within Structure int scode; char name[ 20 ]; //Array within structure int mark; }sub[ 3 ]; //Array of Structure int total; float per; }student; void create(){ student *s; FILE *fp; int n,i,j; printf( "Enter how many students : " ); scanf( "%d" ,&n); s = (student*)calloc(n, sizeof (student)); fp = fopen( "mystudents1.txt" , "w+" ); for (i= 0 ;i<n;i++){ s[i].total= 0 ; s[i].per= 0 ; printf( "Enter RollNo : " ); scanf( "%d" ,&s[i].rno); ...