(Move to ...)
▼
Program to illustrates Array Index out of Bounds
#include<iostream.h>
#include<conio.h>
void main( )
{
const int SIZE = 4;
float A[SIZE]= { 22.22, 44.40, 12.13, 14.15 };
clrscr();
for(int i = 0; i<7;i++) //ERROR : index is out of bounds !
cout<<"\t A["<<i<<" ] = " << A[i]<<endl;
getch();
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment