i uded sizeof in c on array but it fives error then i read on one website we can’t use sizeof with array
Use of size of array
@naaz in c++ you can use it.
you can understand it with a help of example
int arr[]={1,2,3,4,5,6};
cout<<sizeof(arr)<<endl;
/// it will give you output 48 because no of buckets or elements are 6 and size of each bucket is 8 so 6*8=48
if you write this-
cout<<sizeof(arr)/sizeof(int)<<endl; /// it will give you number of elements in the arr ie 6
i hope its cleared if yes dont forget to hit like and mark resolved 