Insertion in c++ Data structure!!!⚠️ don't spam requesting!!
Answers
Answered by
4
Insertion:- In data structure , insertion helps you to insert data at specified position.
Insertion code:-
void Insert(int a[], int n, int item, int POS)
{
int i;
for(i = n; i>=pos-1; i --)
a[i] = a[i - 1];
a[POS-1]=item;
cout<<"Now Array is: " <<endl;
for(i=0;i<=n;i++)
cout<<a[i]<<endl;
}
Similar questions
Social Sciences,
5 months ago
India Languages,
10 months ago
India Languages,
10 months ago
English,
1 year ago
Chemistry,
1 year ago