I'm not giving you the full codes, you need to find the error of this code

my explanation naman so understandable na
int main()
{
FILE* ptr = fopen("personal_info.txt","w"); // open file for writing
if (ptr==NULL) // if error in opening file
{
printf("Error in creating file");
return -1;
}
char [100]=""; // string to store input
// Taking required input
printf("Enter Name:");
gets(str);
fprintf(ptr,"Name: %s\n",str); // to write string to file
printf("Enter Age:");
gets(str);
fprintf(ptr,"Age: %s\n",str)
printf("Enter Birthdate:");
gets(str);
fprintf(ptr,"Birthdate: %s\n",str);
printf("Enter Course and section:");
gets(str);
fprintf(ptr,"Course: \n",str);
printf("Enter Address:");
gets(str);
fprintf(ptr,"Address: %s\n",str);
close(ptr); // closing the file pointer
return 0;
}