[We assume that each piece of apple is identical]
{{{{This part for little more explanation:
There are 12C6 ways that 6 fruits can be taken from the bag
which is equal to
=12!/{(12-6)!*6!}
=(12*11*10*9*8*7*6!) / (6!*6!)
=665280 / (6*5*4*3*2*1)
=924 ways
}}}}}
Your main solution here:
Similarly there are 6C5 ways to get exactly 5 apples out of 6 fruits which is equal to,
=6! / {(6-5)! *5! }
=(6*5!) / (1!*5!)
=6 ways>>>>>>>ANSWER
NOTE: nCx=n! / [(n-x)! *x!] where n=total items and x= no of items choosen
{n is written up in the upper left of C and x is written as Subscript}