0
How we can get the size of an array in c ....
{20,50,60,70,80}
5 ответов
+ 8
sizeof(array)/sizeof(array[0]) , you could have Google that as well
+ 4
Hey buddy,
To determine the size of your array in bytes, you can use the sizeof operator:
Sizeof() : It returns the size of a variable.
For example,
Int array[5];
Sizeof (array);
+ 2
If you have
int array [5];
The size of the array is
sizeof( array );
that is equal to
sizeof( array[0] ) * 5;
The length of your array is just 5 because you declared so. in general you can find the length doing
sizeof( array ) / sizeof( array[0] );
+ 1
Ok i got it thankyou so much....🙏
0
Ok bro..... but i want this answer arr[5]
This size 5 kese aayega 5 yeh