C Program to find the size of the array

Problem Statement

Write a program in C to find the array size.

How to find the size of the array in C ?

#include <stdio.h> 
int main()  
{ 
  int length;
  int arr[2]= { 2, 3 }; 
  length = sizeof(arr)/sizeof(int); 
  printf("The length of Array is %d", length); 
  return 0; 
}

 

%d