#include <cstdio>
template <typename T>
void printsize(T* t, const char* type)
{
std::printf("Calculated size of %s array is %u\n", type, sizeof(t) / sizeof(t[0])) ;
}
int main(void) {
char carray[10];
int iarray[3];
printsize(carray, "char[10]" ) ;
printsize(iarray, "int[3]") ;
}
I2luY2x1ZGUgPGNzdGRpbz4KCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgp2b2lkIHByaW50c2l6ZShUKiB0LCBjb25zdCBjaGFyKiB0eXBlKQp7CglzdGQ6OnByaW50ZigiQ2FsY3VsYXRlZCBzaXplIG9mICVzIGFycmF5IGlzICV1XG4iLCB0eXBlLCBzaXplb2YodCkgLyBzaXplb2YodFswXSkpIDsKfQoKaW50IG1haW4odm9pZCkgewoJY2hhciBjYXJyYXlbMTBdOwoJaW50IGlhcnJheVszXTsKCglwcmludHNpemUoY2FycmF5LCAiY2hhclsxMF0iICkgOwoJcHJpbnRzaXplKGlhcnJheSwgImludFszXSIpIDsKfQo=