Back In the print window choose "Save as PDF" as the destination
NOTE.CS

Length of an Array

1 topic ยท 28 Nov 2026
1

Length of an Array

Problem Solving
Problem: Find the number of elements in an array.
C++
int arr[] = {1,2,3,4,5};
int len = sizeof(arr) / sizeof(arr[0]);
cout << len;   // 5