Mega Code Archive
Categories
/
C++ Tutorial
/
Operators Statements
Use sizeof operator on an array name
#include
using std::cout; using std::endl; int main() { double array[ 20 ]; cout << "The number of bytes in the array is " << sizeof( array ); return 0; } The number of bytes in the array is 160