"C program to read name and marks of n number of students and store them in a file." Code Answer's
You're definitely familiar with the best coding language TypeScript that developers use to develop their projects and they get all their queries like "C program to read name and marks of n number of students and store them in a file." answered properly. Developers are finding an appropriate answer about C program to read name and marks of n number of students and store them in a file. related to the TypeScript coding language. By visiting this online portal developers get answers concerning TypeScript codes question like C program to read name and marks of n number of students and store them in a file.. Enter your desired code related query in the search bar and get every piece of information about TypeScript code related question on C program to read name and marks of n number of students and store them in a file..
C program to read name and marks of n number of students and store them in a file.
#include <stdio.h>
int main()
{
char name[50];
int marks, i, num;
printf("Enter number of students: ");
scanf("%d", &num);
FILE *fptr;
fptr = (fopen("C:\\student.txt", "w"));
if(fptr == NULL)
{
printf("Error!");
exit(1);
}
for(i = 0; i < num; ++i)
{
printf("For student%d\nEnter name: ", i+1);
scanf("%s", name);
printf("Enter marks: ");
scanf("%d", &marks);
fprintf(fptr,"\nName: %s \nMarks=%d \n", name, marks);
}
fclose(fptr);
return 0;
}
All those coders who are working on the TypeScript based application and are stuck on C program to read name and marks of n number of students and store them in a file. can get a collection of related answers to their query. Programmers need to enter their query on C program to read name and marks of n number of students and store them in a file. related to TypeScript code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about C program to read name and marks of n number of students and store them in a file. for the programmers working on TypeScript code while coding their module. Coders are also allowed to rectify already present answers of C program to read name and marks of n number of students and store them in a file. while working on the TypeScript language code. Developers can add up suggestions if they deem fit any other answer relating to "C program to read name and marks of n number of students and store them in a file.". Visit this developer's friendly online web community, CodeProZone, and get your queries like C program to read name and marks of n number of students and store them in a file. resolved professionally and stay updated to the latest TypeScript updates.