Expand|Select|Wrap|Line Numbers
- int main()
- {
- char Name[SIZE], C;
- char RegNo[Reg_N];
- char CourceNo[cource_L];
- while(1)
- {
- printf("Do you have details(Y or N):");
- head1 = NULL;
- scanf("%c",&C);
- if (C=='N' || C=='n')
- {
- print_list();
- break;
- }
- else if(C=='Y' || C=='y')
- {
- printf("Enter E no:");
- scanf("%s",&RegNo);
- printf("Enter Name:");
- scanf("%s",&Name);
- printf("Enter Cources:\n");
- scanf("%s",&CourceNo);
- while(strcmp(CourceNo, "END"))
- {
- cource_list *n_cource = (cource_list *)malloc(sizeof(cource_list));
- strcpy(n_cource ->cource, CourceNo);
- n_cource -> next_cource = head1;
- head1 = n_cource;
- scanf("%s",&CourceNo);
- }
- add_stu(Name, RegNo, head1);
- }
- }
- return 0;
- }