Skip to the task
Layout
Back to classic view

You are looking at: Practice test 2. Your place is still lesson 2, task 1: Types.

CHECKTask 13 of 17 · step 3: Questions 7–12

sizeof p / sizeof *p

int *p = malloc(100 * sizeof *p); What does printf("%zu\n", sizeof p / sizeof *p); print?

Stuck?

It doesn't compile (-Wsizeof-pointer-div); without -Werror – 2, not 100. Keep the count yourself. (Topic 12)