The total different ways are 65536.
How many ways can you buy 8 fruit?
8 choices from 4 options with repetition, so the number of ways is (8+4 − 1 4 − 1 ) = (11 3 ) = 165.
If the order doesn't matter then we have a combination, if the order do matter then we have a permutation.
One could say that a permutation is an ordered combination.
The number of permutations of n objects taken r at a time is determined by the following formula: P(n,r)=n!.
Learn more about permutation and combination here: