a)
- Indefinite loop.
b)
- Initial value of M is 0.
- Loop exit condition is M>10
- Loop body decreases value of M by 1
- Hence exit condition will never be realized.
c)
- Increasing the value of M in the loop or changing the exit condition to M<10.
d)