Logo

Programming-Idioms

History of Idiom 117 > diff from v32 to v33

Edit summary for version 33 by Dodopod:
New C implementation by user [Dodopod]

Version 32

2016-11-30, 20:22:55

Version 33

2017-05-27, 19:28:13

Idiom #117 Get list size

Set n to the number of elements of list x.

Illustration

Idiom #117 Get list size

Set n to the number of elements of list x.

Illustration
Extra Keywords
length
Extra Keywords
length
Code
int n = sizeof(x)/sizeof(*x);