There was an error while loading. Please reload this page.
sizeof can be used to get the size of a value in bytes, if it's given a value surrounded by parentheses.
sizeof
sizeof(my_value)
The resulting value will be a usize that is the size of the type of the value in bytes.
usize
import basics func main { my_integers 100 int number_of_integers usize = sizeof(my_integers) / sizeof int printf("Capacity of number_of_integers: %zu integer(s)\n", number_of_integers) }
Table of Contents