multi dimensional array

i have to numbers 12345678
87654321
and to store in array.

int arr[2][8];

arr[1][8] = 12345678;
arr[0][8] = 12345678;

Please correct!!!
 
arr[0] = {1,2,3,4,5,6,7,8};

read something on basic arrays and its syntax - it would not be easy to struggle through without this simple knowledge.

by the way are you sure you need multi-dimensional arrays here?
What there is to correct?

Apart from:
For array foo[N] the range of valid indices is from 0 to N-1. In your example, you do dereference element [8], which is one past the valid range.
Not sure exactly what you are asking here but maybe you don't need a multidimensional array??

1
2
3
4
int arr[2];

arr[0] = 12345678;
arr[1] = 87654321; 
yes i need no multidimensional array
solved
Topic archived. No new replies allowed.