Here is what I had done in class for Insert Function..
Madam Nay Kaha tha Sahi hay..
But Not Executing here..
Code:
#include <iostream>
using namespace std;
void myinsert(char ar1[], char ar2[], int pos)
{
int n=0;
char temp[20];
while(pos<=20)
{
temp[n]=ar1[pos];
ar1[pos]=ar2[n];
pos++;
n++;
}
for(int m=0; m<=n; m++)
{
ar1[pos]=temp[m];
}
}
void main()
{
char myarray1[5]={'1','2','3','4','5'};
char myarray2[5]={'6','7','8','9','0'};
int pos=2;
char newar[20];
newar=myinsert(myarray1,myarray2,pos);
}