#include<bits/stdc++.h>
using namespace std;
int main() {
    
    array<int,5> a = {1,2,3};
    for(int i=0;i<5;i++){
        cout<<a[i]<<" ";
    }
    cout<<"\nsize of the array "<<a.size()<<"\n"<<"front and last elements: "<<a.front()<<" "<<a.back()<<"\n";
    a.fill(5);
    cout<<"after filling the array with 5 using fill()\n";
    for(int i=0;i<5;i++){
        cout<<a[i]<<" ";
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: