fork download
  1. #include <iostream>
  2. template<int SIZE>
  3. void print(int (&arr)[SIZE])
  4. {
  5. std::cout << sizeof(arr);
  6. }
  7.  
  8. int main()
  9. {
  10. int arr[] = {1,2,3,4,5};
  11.  
  12. print(arr);
  13. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
20