Calculate the number of Carbon atoms in .0400g C7H5NO3S
.0400g is a really non-chemical way to write that number. 

I expect the text meant 0.400g, which is 10 times higher than the number actually printed, and this would explain why the book's answer is 10 times higher than the actual answer: they are working from the number they didn't print.