#include <array> std::array<int, 5> a {1, 2, 3, 4, 5}; int i = a[a.size() - 1]; // The last variable stored in i
int arr = [1,2,3,4]; cout << arr[0]; //printing the first element of the array arr
a = [1,2,3,4,5,6,7] int x = a.size() // last element of list a[x-1] // ourput -> 7