Fixed-Size C-Style Arrays in C++
🟢 Beginner
📖 Definition
A C-style array (T arr[N]) stores a fixed-length contiguous sequence of elements of the same type in memory. When passed to functions, raw arrays decay into pointers to their first element.
💡 Code Example
#include <iostream>
int main() {
int scores[5] = {90, 85, 78, 92, 88};
for (int i = 0; i < 5; ++i) {
std::cout << "Score [" << i << "]: " << scores[i] << "\n";
}
return 0;
}