-2

We have been given a large array of unknown size with elements given , is there any function or something other through which we can find the size of that array in language C int a[]={4,6,4,26,3,2,5,7,3,7,3,2,5,4,6,3,7,232,6,32,6,3,7,3,6,2,5,7,3,6,3,6,36,3,67,23,6};

Azam
  • 11
  • 4

1 Answers1

1

The size in bytes you can get by

sizeof(a);

The number of elements in that array you can get by

sizeof(a)/sizeof(a[0]);
Yunnosch
  • 26,130
  • 9
  • 42
  • 54