Important program in C

#include<stdio.h>#include<conio.h>#include<string.h>struct emp{ char name[10]; int age; }; File handling concept void NameAndAgeStoring(){ struct emp e; FILE *p, *q; p= fopen(“list.txt”,”a”); q= fopen(“list.txt”,”r”); printf(“enter the name and age”); scanf(“%s %d”,e.name,e.age); fprintf(p,”%s %d”,e.name,e.age); fclose(p); do{ fscanf(q,”%s %d”,e.name,e.age); printf(“%s %d”,e.name,e.age); } while(!feof(q)); getch();} Read More …

Important program in C

#include<stdio.h>#include<conio.h>#include<string.h>struct emp{ char name[10]; int age; }; File handling concept void NameAndAgeStoring(){ struct emp e; FILE *p, *q; p= fopen(“list.txt”,”a”); q= fopen(“list.txt”,”r”); printf(“enter the name and age”); scanf(“%s %d”,e.name,e.age); fprintf(p,”%s %d”,e.name,e.age); fclose(p); do{ fscanf(q,”%s %d”,e.name,e.age); printf(“%s %d”,e.name,e.age); } while(!feof(q)); getch();} Read More …

Important program in C

#include<stdio.h> #include<conio.h> #include<string.h> struct emp{ char name[10]; int age; }; File handling concept void NameAndAgeStoring(){ struct emp e; FILE *p, *q; p= fopen(“list.txt”,”a”); q= fopen(“list.txt”,”r”); printf(“enter the name and age”); scanf(“%s %d”,e.name,e.age); fprintf(p,”%s %d”,e.name,e.age); fclose(p); do{ fscanf(q,”%s %d”,e.name,e.age); printf(“%s %d”,e.name,e.age); Read More …