IT HOME Programming care

IT HOME Programming Care

Thursday, November 17, 2016

Function id wise display in link list

Function  id wise display in link list


Function  id wise display in link list




/* Function  id wise display in link list*/
void id_wise_display()
{
system("cls");
linked_menu();

do{
printf("\n\tENTER THE ID NUMBER = ");
fflush(stdin);
gets(temp_id);
temp = special_character_check(temp_id);

if(strcmp(temp_id,"")==0)
{
printf("\a\n\tERROR: STUDENT_ID FIELD CANNOT BE BLANK");
temp=0;
}
else
temp=1;

fflush(stdin);

}while(temp!=1);

uppercase(temp_id);
temp_point = start;
flag = 0;
while(temp_point!=NULL)
{
if(stricmp(temp_id,temp_point-> student_id)==0)
{
flag = 1;
break;
}
temp_point = temp_point -> ptr;
}
if(flag == 1)
{

printf("\n\nRECORDS IN THE LIST ARE AS FOLLOW - ");
printf("\n\n   |  STUDENT NAME      |  STUDENT_ID     |  BRANCH        |  SEMESTER  |");
printf("\n   __________________________________________________________________  ");
printf("\n\n   ");
printf("|  %-18s", temp_point -> student_name);
printf("|  %-14s", temp_point -> student_id);
printf("|  %-14s",temp_point -> student_branch);
printf("|    %-3d  |",temp_point->level_number);

}
else if(flag==0)
{
printf("\a\n\t\tSTUDENT_ID %s DOES NOT EXIST IN THE LIST",temp_id);
}

}

0 comments:

Post a Comment

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();

IT HOME Freelancing Care