Array
Try it yourself →Fixed-size collection of elements.
Syntax
type name[size] = {...};Description
Arrays have a fixed size. Elements are accessed with 0-based indexing.
Example
#include <iostream>
using namespace std;
int main() {
int numbers[3] = {10, 20, 30};
cout << numbers[0] << endl;
return 0;
}Expected output
10
When to use?
Fixed number of values.