+ 2
Find error in this declaration
2 Answers
+ 3
You've already declared 'p'.
Also, just a size goes in the [] (no declarations).
int const p=5;
int ar[p];
Note: By convention, constants are written ALLCAPS and...I'm used to seeing 'const' first, like this:
const int P=5;
0
kirk's right, but just one more thing
to display an array item u must use ar[position num]