data array

#include<iostream.h>
#include<conio.h>
#include<math.h>
main()
{
int i;
int A[1000];

for(i=0;i<1001;)
{
A[i]=i;
cout<<"\n"<<A[i];
i=i+1;
}
getch();
}



when i run this program....the numbers starts from 701 but they ought to start from 0 or 1....can any one please explain this???
The program probably outputs very fast so that you have no time to see it all.
In the loop condition it should be i<1000.
then is there any way to see the whole outcome???
add a getch() to your loop so you have to press a key to continue with each number
Maybe you can tell whatever it is cout is outputting to to not discard old output until some higher limit.
Topic archived. No new replies allowed.