insertion c++
DESCRIPTION
PROGRAM IN C++ FOR INSERTIONTRANSCRIPT
![Page 1: INSERTION C++](https://reader030.vdocuments.net/reader030/viewer/2022020211/55cf8fa4550346703b9e5130/html5/thumbnails/1.jpg)
#include<iostream.h>#include<conio.h>void fun(int a[],int &n,int num,int pos){for (int i=n;i>=pos-1;i--)a[i]=a[i-1];a[i+1]=num;n++;}void main(){ clrscr();int a[10],n,num,pos;cout<<"how many nos you want to enter\n ";cin>>n;cout<<"enter "<<n<<" numbers\n";for (int i=0;i<n;i++)cin>>a[i];cout<<"enter number to be inserted\n";cin>>num;cout<<"enter position of no ";cin>>pos;fun(a,n,num,pos);cout<<"new array is ";for (i=0;i<n;i++)cout<<a[i]<<"\n";getch();}/*outputhow many nos you want to enter 5enter 5 numbers13568enter number to be inserted7enter position of no 5new array is 135678*/