I had a miscarriage and d&c.Are there any chances of infertility after that?

Not likely. It's highly unlikely that fertility problems result just from having a miscarriage with d&c. There are uncommon (though not rare) complications following D&C that can affect fertility, but mostly you'll be back to normal.
Possibly. It all depends on the circumstances surrounding the miscarriage but usually, this will not affect future fertility.