the ntvdm cpu has encountered an illegal instruction error :( :(

Status
Not open for further replies.

ashwini jayaraman

Member level 2
Joined
Jan 17, 2013
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,601
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,m,p,a[100];
clrscr();
printf("\n Enter any no: ");
scanf("%d",&n);
printf("\n Where do you want to insert? ");
scanf("%d",&m);
printf("\n No u want to enter? ");
scanf("%d",&p);
for(i=0;i<n;i++)
{
scanf("%d",&a);
}
for(i=n;i>=m-1;i++)
{
a=a[i-1];
}
a[m-1]=p;
for(i=0;i<=n;i++)
{
printf("%d",a);
}
getch();
}
This is my coding for insrtion at the middle
someone explain me this error
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…