Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 232ba76

Browse files
Nishkarsh Raj made changes
1 parent 57d639f commit 232ba76

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎linkedmain.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,14 @@ int main()
9797
delete ptr;
9898
break;
9999
case 5: cout<<"Deletion at End"<<endl;
100+
if(start->next!=NULL)
101+
{
100102
for(ptr=start;ptr->next!=NULL;p=ptr,ptr=ptr->next);
101103
delete ptr;
102104
p->next=NULL;
105+
}
106+
else
107+
delete start;
103108
break;
104109
case 6: cout<<"Deletion anywhere"<<endl;
105110
cout<<"Enter name of the student whose record you want to delete"<<endl;

‎linkedmain.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /