How many numbers of 6 digits are possible with the property that the sum of their digits is 5?
Explanation: There are 6 digits and their sum is 5. So,
a + b + c + d + e + f = 5
1 ≤ a ≤ 9, and 0 ≤ b, c, d, e, f ≤ 9
(a'+1) + b + c + d + e + f = 5 a' + b + c + d + e + f = 4
(4+5)C5 = 9C5 = 126
So, option (D) is correct.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.