C program to find array size:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#include <stdio.h> int arr[8]= { 1, 2, 3, 4, 5, 6, 7, 8 }; int main() { int length; length = sizeof(arr)/sizeof(int); printf("The length of Array is %d", length); return 0; } |
The length of Array is 8