Код: Выделить всё
#include
int main() {
int a1[5] = {1, 2, 3}; // other element will be set as the default value
int size = sizeof(a1) / sizeof(*a1);
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79343152/getting-the-size-of-an-array-in-c[/url]
Мобильная версия