Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

find length of array in c

int a[17]; // initializing an array
int length = sizeof(a)/sizeof(a[0]); // divide array size(in byte)/ size of the first element of the array of the same type, here int(integer size is 4byte)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #length #array
ADD COMMENT
Topic
Name
3+9 =