C Program
#include <stdio.h> int main() { char name[50]; int marks, i,n; printf(“Enter number of students”); scanf(“%d”, &n); FILE *fptr; fptr=(fopen(“C:\student.txt”,”a”)); if (fptr==NULL){ printf("Error!"); exit(1); } for(i=0;i<n;++i) { printf("For student%dnEnter name: ",i+1);