Mega Code Archive
Categories
/
C++
/
Data Type
Get array length with sizeof function
#include
#include
#include
#include
using namespace std; int main(){ const int a[] = { 98, 7, 54, 69, 87, 88, 56, 92, 77,39, }; const int len = sizeof( a ) / sizeof( a[0] ); }