Posted By

rdc009 on 04/18/14


Tagged


Versions (?)

Arrays :: General


 / Published in: Other
 

  1. #include <iostream>
  2. #include <array>
  3. #define ARRAY_SIZE(array) ((sizeof(0) / sizeof(array[0])))
  4. using namespace std;
  5. int main(int argc, char *argv[]) {
  6.  
  7. long int nums[13] = {1,9,900000,0,2,3,4,9000000000000,5,6,7,8,00};
  8. cout << ARRAY_SIZE(nums);
  9. }
  10.  
  11. #will get the length of the array

Report this snippet  

You need to login to post a comment.