Which of the following sentences is punctuated correctly?

a

All thirty two nine year old students carried twenty pound backpacks.
b

All thirty-two nine year old students carried twenty-pound backpacks.
c

All thirty two nine-year-old students carried twenty-pound-backpacks
d

All thirty-two nine-year-old students carried twenty-pound backpacks.

The correct sentence is:

d

All thirty-two nine-year-old students carried twenty-pound backpacks.

The correct sentence is:

d

All thirty-two nine-year-old students carried twenty-pound backpacks.