21 lines
467 B
C++
21 lines
467 B
C++
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int return_byte_size() {
|
|
int number_array[10] = {1,2,3,4,5,6,7,8,9,10};
|
|
return sizeof(number_array);
|
|
}
|
|
|
|
int return_length_of() {
|
|
int number_array[10] = {1,2,3,4,5,6,7,8,9,10};
|
|
return sizeof(number_array) / sizeof(number_array[0]);
|
|
}
|
|
|
|
int main() {
|
|
cout << return_byte_size() << "\n";
|
|
cout << return_length_of() << "\n";
|
|
cout << "Looping through";
|
|
cout << loop_sizeof() << "\n";
|
|
return 0;
|
|
} |