#include<iostream> using namespace std; template<class T=int,int size=5> class array { T var[size]; int i; public: array() { for(i=0;i<size;i++) var[i]=i; } void display() { for(i=0;i<size;i++) cout<<var[i]<<"\n"; cout<<"\nSize of variable:"; cout<<sizeof(var); } }; int main() { array<int> a1; array<float,10> a2; cout<<"using int\n"; a1.display(); cout<<"\nusing float\n"; a2.display(); return 0; }