Moderator Note: This is also posted on StackOverflow as How do I find number of subsets satisfying two constraints?.
Suppose I have a set $A=\{1,2,3,4\}$ and I have to find a number of subsets that have $k$ number of elements and must have an element $p$, Let's assume $k=3$ and $p=2$, So I need number of subsets of size $3$ must be having element $2$ in it, In this case there will be $3$ Subsets.
How can I calculate it using formulas?