Code:
# include <stdio.h>
# include <conio.h>
# include <string.h>
int main ();
struct RecordInfo{char Student_Name[25];
int id_num[10];
int Tel.Num[7];
char Address[40];
char Program[15];
};
struct DOB{int dd,mm,yyyy};
// Function Prototype
void RecordInfo(RecordInfo);
void main (void) {
RecordInfo Student_Name;
RecordInfo (Student_Name);
getch();
}
void RecordInfo(Student_Name.s){
printf("Enter name & id_num");
scanf("%d, %s"&s.name,s.id_num);
printf("Enter student's address");
scanf ("%c",& s.address);
printf("Enter student's D.O.B & Tel.Num");
scanf("%d %d",& s. D.O.B, s.Tel.Num);
printf("Enter student Program_Name");
scanf("%s",& s.Program);
}
};
int Update_Records;
char Update[50];
printf("Enter Name of the person you wish to change: ");
scanf("%s", &name);
for (int i=0;i<10;i++);
{
if (strcmp(name[i].FirstName) == 0);
{
printf("What do you want to Modify?\n");
printf("Press 1. to edit Last Name\n Press 2. to edit First Name\n Press 3. to edit Id Num\n Press 4. to edit D.O.B\n Press 5. to edit Address\n Press to edit Telephone number\n Press 7. to edit Program Name\n");
scanf("%d", &Update_Records);
switch (Update) {
case 1:
printf("Enter the new Last Name: ");
scanf("%d", &students[i].Last Name);
break;
case 2:
printf("Enter student's updated First Name: ");
scanf("%s", &RecordInfo[i].First Name);
break;
case 3:
printf("Enter student's updated Id Num : ");
scanf("%s", &RecordInfo[i].Id Num);
break;
case 4:
printf("Enter student's updated Date of Birth: ");
scanf("%d", &students[i].DateOfBirth);
break;
case 5:
printf("Enter student's updated Address: ");
scanf("%s", &students[i].Address);
break;
case 6:
printf("Enter student's updated Telephone Number: ");
scanf("%s", &students[i].TelephoneNumber);
break;
case 7:
printf("Enter new Program: ");
scanf("%s", &students[i].ProgramPursued);
break;
default:
printf("Wrong entry\n");
break;
}
}
}
}
getch ();
this is the program