Answer
a) 4,705,360,871,073,570,227,520.
b) 196,056,702,961,398,759,480
Work Step by Step
a) When boxes are distinguishable, then in the 1st box issues can be chosen in (40,10)
For the Second box, only 30 issues remain so it can be chosen in C(30,10)
Similarly, for 3rd and 4th box, we have C(20,10) and C(10,10) respectively.
Using product rule we get C(40,10)$\times$C(30,10)$\times$C(20,10)$\times$C(10,10)
= $\frac{40!}{10!^{4}}$ = 4,705,360,871,073,570,227,520.
b) When boxes are identical we divide the previous solution by 4!
so the solution becomes $\frac{40!}{10!^{4}.4!}$ =196,056,702,961,398,759,480