What will be the output of the following C++ code
#include <iostream>
#include <array>
using namespace std;
int main(int argc, char const *argv[])
{
array<int,arr arr1.fill(2);
for(int i=0;i<5;i++)
cout<<arr1[i];
cout<<endl;
return}
20000
20002
22222
00002
Answer and explanation
empty() function is used to check whether the size of an array class is zero or not. It is not used to check whether an array is empty or not. The function true only if size/max_size of an array is zero otherwise it returns false.
