A shop has 4 distinct flavors of ice-cream. One can purchase any number of scoops of any flavor. The order in which the scoops are purchased is inconsequential.
If one wants to purchase 3 scoops of ice-cream, in how many ways can one make that purchase? 

A.

4

B.

20

C.

24

D.

48

Solution:

Here x1x2x3x4 flavor
x + x + x + x = 3 square  x + x + ... + x = n  [non-negative integer solutions]   (n + r - 1)C(r-1)   (3 + 4 - 1)C(4-1)   C = 6 × 5 × 4 3 × 2 × 1   = 20