I need to include array bounds checking in the programs i write.
With strings i use the following for bounds checking :
How could I implement bounds checking on a integer array?Code:char s; scanf("%100s",s);
Here a user could enter several integers (>10) separated by whitespaces which would result in overflow. How can I check this?Code:int a; int i; for(i=0;i<10;i++) scanf("%d",&a[i]);