Is the memory in std::array contiguous?

Viewed 9760

Is the memory in std::array contiguous? Is the following valid/good practice?

std::array<type1,Num> arr = //initialize value
type1 * ptr = &arr[0];

Could I then pass ptr to functions expecting a c-style array?

2 Answers
Related