Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

ashwini jayaraman

Member level 2
Member level 2
Joined
Jan 17, 2013
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top