a 40-year-old man, a 40-years-old man,
24-hour service, 24-hours service,
which is right? which is wrong? why it is right, why wrong?
He's a 40-year-old man and it's a 24-hour service.
When a compound adjective precedes a noun, and that compound adjective contains a countable noun, it should normally take the singular form:
He's a 40-year-old man; he's 40 years old.
It's a 24-hour service; it continues 24 hours a day.